The eslint setup is out of sync with prettier and the result is "errors" primarily around single quotes vs double quotes.
pnpm dlx create-next-app@latest --use-pnpm
✔ Would you like to use TypeScript? … No / Yes
✔ Would you like to use ESLint? … No / Yes
✔ Would you like to use Tailwind CSS? … No / Yes
✔ Would you like to use `src/` directory? … No / Yes
✔ Would you like to use App Router? (recommended) … No / Yes
✔ Would you like to customize the default import alias (@/*)? … No / Yes
Added .eslint.json
and replaced .eslintrc.json
with these files.
Added these devDependencies
:
"eslint": "^8",
"eslint-config-next": "14.0.4",
"eslint-config-standard": "^17.1.0",
"eslint-config-standard-with-typescript": "^43.0.0",
"eslint-config-unicorn": "^0.5.0",
"eslint-plugin-cypress": "^2.15.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-eslint-plugin": "^5.2.1",
"eslint-plugin-github": "^4.10.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.6.0",
"eslint-plugin-jest-dom": "^5.1.0",
"eslint-plugin-no-unsanitized": "^4.0.2",
"eslint-plugin-prettier": "^5.1.2",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-tailwindcss": "^3.13.1",
"eslint-plugin-testing-library": "^6.2.0",
"eslint-plugin-unicorn": "^50.0.1",
Result
pnpm run lint
> [email protected] lint /Users/jherr/tmp/lint-check/lint-test
> next lint
./src/app/layout.tsx
1:31 Error: Strings must use singlequote. @typescript-eslint/quotes
1:31 Error: Strings must use singlequote. quotes
1:37 Error: Extra semicolon. @typescript-eslint/semi
1:37 Error: Extra semicolon. semi
2:23 Error: Strings must use singlequote. @typescript-eslint/quotes
2:23 Error: Strings must use singlequote. quotes
2:41 Error: Extra semicolon. @typescript-eslint/semi
2:41 Error: Extra semicolon. semi
3:8 Error: Strings must use singlequote. @typescript-eslint/quotes
3:8 Error: Strings must use singlequote. quotes
3:23 Error: Extra semicolon. @typescript-eslint/semi
3:23 Error: Extra semicolon. semi
5:33 Error: Strings must use singlequote. @typescript-eslint/quotes
5:33 Error: Strings must use singlequote. quotes
5:44 Error: Extra semicolon. @typescript-eslint/semi
5:44 Error: Extra semicolon. semi
8:10 Error: Strings must use singlequote. @typescript-eslint/quotes
8:10 Error: Strings must use singlequote. quotes
9:3 Error: Expected object keys to be in insensitive ascending order. 'description' should be before 'title'. sort-keys
9:16 Error: Strings must use singlequote. @typescript-eslint/quotes
9:16 Error: Strings must use singlequote. quotes
9:46 Error: Unexpected trailing comma. @typescript-eslint/comma-dangle
9:46 Error: Unexpected trailing comma. comma-dangle
10:2 Error: Extra semicolon. @typescript-eslint/semi
10:2 Error: Extra semicolon. semi
12:16 Error: Missing return type on function. @typescript-eslint/explicit-module-boundary-types
12:16 Error: Missing return type on function. @typescript-eslint/explicit-function-return-type
13:11 Error: Unexpected trailing comma. @typescript-eslint/comma-dangle
13:11 Error: Unexpected trailing comma. comma-dangle
15:38 Error: Unexpected separator (;). @typescript-eslint/member-delimiter-style
18:5 Error: Expected indentation of 2 space characters but found 4. react/jsx-indent
19:7 Error: Expected indentation of 4 space characters but found 6. react/jsx-indent
20:3 Error: Insert `··` prettier/prettier
20:3 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
20:3 Error: Expected indentation of 4 space characters but found 2. react/jsx-indent
21:4 Error: Extra semicolon. @typescript-eslint/semi
21:4 Error: Extra semicolon. semi
./src/app/page.tsx
1:19 Error: Replace `'next/image'` with `"next/image"` prettier/prettier
1:31 Error: Extra semicolon. @typescript-eslint/semi
1:31 Error: Extra semicolon. semi
3:16 Error: Missing return type on function. @typescript-eslint/explicit-module-boundary-types
3:16 Error: Function 'Home' has too many lines (112). Maximum allowed is 50. max-lines-per-function
3:16 Error: Missing return type on function. @typescript-eslint/explicit-function-return-type
5:1 Error: This line has a length of 83. Maximum allowed is 80. max-len
5:5 Error: Expected indentation of 2 space characters but found 4. react/jsx-indent
6:1 Error: This line has a length of 100. Maximum allowed is 80. max-len
6:7 Error: Expected indentation of 4 space characters but found 6. react/jsx-indent
7:1 Error: This line has a length of 305. Maximum allowed is 80. max-len
7:9 Error: Expected indentation of 6 space characters but found 8. react/jsx-indent
7:306 Error: Expected indentation of 8 space characters but found 6. react/jsx-indent
7:306 Error: Strings not allowed in JSX files: "Get started by editing " react/jsx-no-literals
8:7 Error: Insert `····` prettier/prettier
9:11 Error: Ambiguous spacing before next element code react/jsx-child-element-spacing
9:11 Error: Expected indentation of 8 space characters but found 10. react/jsx-indent
9:49 Error: Strings not allowed in JSX files: "src/app/page.tsx" react/jsx-no-literals
10:1 Error: Insert `··` prettier/prettier
10:7 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
10:7 Error: Expected indentation of 8 space characters but found 6. react/jsx-indent
11:1 Error: This line has a length of 199. Maximum allowed is 80. max-len
11:9 Error: Expected indentation of 6 space characters but found 8. react/jsx-indent
12:1 Error: Replace `······` with `··········` prettier/prettier
12:7 Error: Expected indentation of 8 space characters but found 6. react/jsx-indent
13:1 Error: This line has a length of 107. Maximum allowed is 80. max-len
13:13 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
14:1 Error: This line has a length of 120. Maximum allowed is 80. max-len
14:13 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
15:13 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
16:13 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
16:13 Error: Props should be sorted alphabetically react/jsx-sort-props
17:9 Error: Insert `··` prettier/prettier
17:9 Warning: The closing bracket must be aligned with the line containing the opening tag (expected column 7) react/jsx-closing-bracket-location
17:10 Error: Expected indentation of 6 space characters but found 12. react/jsx-indent
17:10 Error: Strings not allowed in JSX files: "By" react/jsx-no-literals
18:15 Error: Replace `⏎{'·'` with `{"·"` prettier/prettier
19:1 Error: Expected indentation of 6 space characters but found 0. react/jsx-indent
20:9 Error: Insert `····` prettier/prettier
20:9 Error: Expected indentation of 6 space characters but found 8. react/jsx-indent
21:15 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
22:15 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
22:15 Error: Props should be sorted alphabetically react/jsx-sort-props
23:15 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
23:15 Error: Props should be sorted alphabetically react/jsx-sort-props
23:15 Error: Prop "className" is forbidden on Components react/forbid-component-props
24:15 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
25:15 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
25:15 Error: Props should be sorted alphabetically react/jsx-sort-props
26:15 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
26:15 Error: Props should be sorted alphabetically react/jsx-sort-props
27:13 Warning: The closing bracket must be aligned with the line containing the opening tag (expected column 9) react/jsx-closing-bracket-location
28:11 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
28:11 Error: Expected indentation of 6 space characters but found 10. react/jsx-indent
29:7 Error: Insert `··` prettier/prettier
29:7 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
29:7 Error: Expected indentation of 8 space characters but found 6. react/jsx-indent
30:1 Error: Insert `··` prettier/prettier
30:5 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
30:5 Error: Expected indentation of 6 space characters but found 4. react/jsx-indent
32:1 Error: This line has a length of 633. Maximum allowed is 80. max-len
32:7 Error: Expected indentation of 4 space characters but found 6. react/jsx-indent
33:5 Error: Insert `····` prettier/prettier
33:5 Error: Expected indentation of 6 space characters but found 4. react/jsx-indent
34:1 Error: This line has a length of 82. Maximum allowed is 80. max-len
34:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
34:11 Error: Prop "className" is forbidden on Components react/forbid-component-props
35:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
36:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
36:11 Error: Props should be sorted alphabetically react/jsx-sort-props
37:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
38:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
38:11 Error: Props should be sorted alphabetically react/jsx-sort-props
39:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
39:11 Error: Props should be sorted alphabetically react/jsx-sort-props
40:7 Error: Insert `··` prettier/prettier
40:7 Warning: The closing bracket must be aligned with the line containing the opening tag (expected column 5) react/jsx-closing-bracket-location
41:1 Error: Insert `··` prettier/prettier
41:5 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
41:5 Error: Expected indentation of 6 space characters but found 4. react/jsx-indent
43:1 Error: This line has a length of 101. Maximum allowed is 80. max-len
43:1 Error: Insert `····` prettier/prettier
43:3 Error: Expected indentation of 4 space characters but found 2. react/jsx-indent
44:7 Error: Insert `··` prettier/prettier
44:7 Error: Expected indentation of 2 space characters but found 6. react/jsx-indent
45:1 Error: This line has a length of 123. Maximum allowed is 80. max-len
45:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
46:1 Error: This line has a length of 191. Maximum allowed is 80. max-len
46:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
46:11 Error: Props should be sorted alphabetically react/jsx-sort-props
47:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
48:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
48:11 Error: Props should be sorted alphabetically react/jsx-sort-props
49:3 Error: Insert `······` prettier/prettier
49:3 Warning: The closing bracket must be aligned with the line containing the opening tag (expected column 7) react/jsx-closing-bracket-location
50:11 Error: Expected indentation of 6 space characters but found 10. react/jsx-indent
50:55 Error: Expected indentation of 10 space characters but found 6. react/jsx-indent
50:55 Error: Strings not allowed in JSX files: "Docs" react/jsx-no-literals
51:7 Error: Replace `Docs{'·'` with `······Docs{"·"` prettier/prettier
51:11 Error: `{' '}` must be placed on a new line react/jsx-one-expression-per-line
52:1 Error: This line has a length of 119. Maximum allowed is 80. max-len
52:13 Error: Expected indentation of 10 space characters but found 12. react/jsx-indent
52:120 Error: Expected indentation of 12 space characters but found 10. react/jsx-indent
52:120 Error: Strings not allowed in JSX files: "->" react/jsx-no-literals
53:1 Error: Replace `··········` with `··············` prettier/prettier
55:7 Error: Insert `····` prettier/prettier
55:7 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
55:7 Error: Expected indentation of 10 space characters but found 6. react/jsx-indent
56:3 Error: Insert `········` prettier/prettier
56:3 Error: Expected indentation of 6 space characters but found 2. react/jsx-indent
56:54 Error: Expected indentation of 2 space characters but found 10. react/jsx-indent
56:54 Error: Strings not allowed in JSX files: "Find in-depth information about Next.js features and API." react/jsx-no-literals
57:1 Error: Insert `··` prettier/prettier
58:11 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
58:11 Error: Expected indentation of 2 space characters but found 10. react/jsx-indent
59:3 Error: Insert `······` prettier/prettier
59:3 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
59:3 Error: Expected indentation of 6 space characters but found 2. react/jsx-indent
61:1 Error: Insert `··` prettier/prettier
61:7 Error: Expected indentation of 2 space characters but found 6. react/jsx-indent
62:1 Error: This line has a length of 127. Maximum allowed is 80. max-len
62:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
63:1 Error: This line has a length of 191. Maximum allowed is 80. max-len
63:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
63:11 Error: Props should be sorted alphabetically react/jsx-sort-props
64:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
65:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
65:11 Error: Props should be sorted alphabetically react/jsx-sort-props
66:9 Warning: The closing bracket must be aligned with the line containing the opening tag (expected column 7) react/jsx-closing-bracket-location
67:11 Error: Expected indentation of 6 space characters but found 10. react/jsx-indent
67:55 Error: Expected indentation of 10 space characters but found 6. react/jsx-indent
67:55 Error: Strings not allowed in JSX files: "Learn" react/jsx-no-literals
68:7 Error: Replace `Learn{'·'` with `······Learn{"·"` prettier/prettier
68:12 Error: `{' '}` must be placed on a new line react/jsx-one-expression-per-line
69:1 Error: This line has a length of 113. Maximum allowed is 80. max-len
69:1 Error: Insert `······` prettier/prettier
69:7 Error: Expected indentation of 10 space characters but found 6. react/jsx-indent
69:114 Error: Expected indentation of 6 space characters but found 12. react/jsx-indent
69:114 Error: Strings not allowed in JSX files: "->" react/jsx-no-literals
70:1 Error: Insert `··` prettier/prettier
71:13 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
71:13 Error: Expected indentation of 6 space characters but found 12. react/jsx-indent
72:7 Error: Insert `····` prettier/prettier
72:7 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
72:7 Error: Expected indentation of 10 space characters but found 6. react/jsx-indent
73:1 Error: Insert `··` prettier/prettier
73:9 Error: Expected indentation of 6 space characters but found 8. react/jsx-indent
73:60 Error: Expected indentation of 8 space characters but found 10. react/jsx-indent
73:60 Error: Strings not allowed in JSX files: "Learn about Next.js in an interactive course with quizzes!" react/jsx-no-literals
74:1 Error: Insert `··` prettier/prettier
75:11 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
75:11 Error: Expected indentation of 8 space characters but found 10. react/jsx-indent
76:9 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
76:9 Error: Expected indentation of 6 space characters but found 8. react/jsx-indent
78:1 Error: Insert `··` prettier/prettier
78:7 Error: Expected indentation of 2 space characters but found 6. react/jsx-indent
79:1 Error: This line has a length of 146. Maximum allowed is 80. max-len
79:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
80:1 Error: This line has a length of 191. Maximum allowed is 80. max-len
80:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
80:11 Error: Props should be sorted alphabetically react/jsx-sort-props
81:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
82:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
82:11 Error: Props should be sorted alphabetically react/jsx-sort-props
83:9 Warning: The closing bracket must be aligned with the line containing the opening tag (expected column 7) react/jsx-closing-bracket-location
84:11 Error: Expected indentation of 6 space characters but found 10. react/jsx-indent
84:55 Error: Expected indentation of 10 space characters but found 6. react/jsx-indent
84:55 Error: Strings not allowed in JSX files: "Templates" react/jsx-no-literals
85:7 Error: Replace `Templates{'·'` with `······Templates{"·"` prettier/prettier
85:16 Error: `{' '}` must be placed on a new line react/jsx-one-expression-per-line
86:1 Error: This line has a length of 119. Maximum allowed is 80. max-len
86:13 Error: Expected indentation of 10 space characters but found 12. react/jsx-indent
86:120 Error: Expected indentation of 12 space characters but found 10. react/jsx-indent
86:120 Error: Strings not allowed in JSX files: "->" react/jsx-no-literals
87:11 Error: Insert `····` prettier/prettier
89:1 Error: Insert `····` prettier/prettier
89:7 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
89:7 Error: Expected indentation of 10 space characters but found 6. react/jsx-indent
90:11 Error: Expected indentation of 6 space characters but found 10. react/jsx-indent
90:62 Error: Expected indentation of 10 space characters but found 6. react/jsx-indent
90:62 Error: Strings not allowed in JSX files: "Explore starter templates for Next.js." react/jsx-no-literals
91:7 Error: Insert `······` prettier/prettier
93:9 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
93:9 Error: Expected indentation of 6 space characters but found 8. react/jsx-indent
95:1 Error: Insert `··` prettier/prettier
95:7 Error: Expected indentation of 2 space characters but found 6. react/jsx-indent
96:1 Error: This line has a length of 122. Maximum allowed is 80. max-len
96:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
97:1 Error: This line has a length of 191. Maximum allowed is 80. max-len
97:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
97:11 Error: Props should be sorted alphabetically react/jsx-sort-props
98:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
99:11 Error: Expected indentation of 1 tab character but found 0. react/jsx-indent-props
99:11 Error: Props should be sorted alphabetically react/jsx-sort-props
100:9 Warning: The closing bracket must be aligned with the line containing the opening tag (expected column 7) react/jsx-closing-bracket-location
101:11 Error: Expected indentation of 6 space characters but found 10. react/jsx-indent
101:55 Error: Expected indentation of 10 space characters but found 6. react/jsx-indent
101:55 Error: Strings not allowed in JSX files: "Deploy" react/jsx-no-literals
102:1 Error: Replace `······Deploy{'·'` with `············Deploy{"·"` prettier/prettier
102:13 Error: `{' '}` must be placed on a new line react/jsx-one-expression-per-line
103:1 Error: This line has a length of 119. Maximum allowed is 80. max-len
103:13 Error: Expected indentation of 10 space characters but found 12. react/jsx-indent
103:120 Error: Expected indentation of 12 space characters but found 10. react/jsx-indent
103:120 Error: Strings not allowed in JSX files: "->" react/jsx-no-literals
104:11 Error: Insert `····` prettier/prettier
106:1 Error: Replace `······` with `··········` prettier/prettier
106:7 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
106:7 Error: Expected indentation of 10 space characters but found 6. react/jsx-indent
107:1 Error: Insert `··` prettier/prettier
107:9 Error: Expected indentation of 6 space characters but found 8. react/jsx-indent
107:60 Error: Expected indentation of 8 space characters but found 10. react/jsx-indent
107:60 Error: Strings not allowed in JSX files: "Instantly deploy your Next.js site to a shareable URL with Vercel." react/jsx-no-literals
108:1 Error: Insert `··` prettier/prettier
109:11 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
109:11 Error: Expected indentation of 8 space characters but found 10. react/jsx-indent
110:9 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
110:9 Error: Expected indentation of 6 space characters but found 8. react/jsx-indent
111:7 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
111:7 Error: Expected indentation of 2 space characters but found 6. react/jsx-indent
112:3 Error: Insert `··` prettier/prettier
112:3 Error: Expected closing tag to match indentation of opening. react/jsx-closing-tag-location
112:3 Error: Expected indentation of 4 space characters but found 2. react/jsx-indent
113:4 Error: Insert `;` prettier/prettier
info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rule
None of these are actual errors.