|
1 | 1 | import js from "@eslint/js";
|
2 |
| -import eslintImport, { rules } from "eslint-plugin-import-x"; |
| 2 | +import nextPlugin from "@next/eslint-plugin-next"; |
| 3 | +import eslintImport from "eslint-plugin-import-x"; |
3 | 4 | import * as mdx from "eslint-plugin-mdx";
|
4 | 5 | import react from "eslint-plugin-react";
|
5 | 6 | import reactHooks from "eslint-plugin-react-hooks";
|
6 | 7 | import simpleImportSort from "eslint-plugin-simple-import-sort";
|
7 | 8 | import eslintPluginUnicorn from "eslint-plugin-unicorn";
|
8 | 9 | import unusedImports from "eslint-plugin-unused-imports";
|
9 | 10 | import tseslint from "typescript-eslint";
|
10 |
| -import nextPlugin from "@next/eslint-plugin-next"; |
11 | 11 |
|
12 | 12 | const tsParserOptions = {
|
13 | 13 | parser: tseslint.parser,
|
@@ -65,6 +65,7 @@ const standardRules = {
|
65 | 65 | "object-shorthand": ["warn"],
|
66 | 66 | "no-with": ["error"],
|
67 | 67 | "no-var": ["warn"],
|
| 68 | + "no-useless-assignment": "warn", |
68 | 69 | "no-useless-return": ["warn"],
|
69 | 70 | "no-useless-rename": ["warn"],
|
70 | 71 | "no-useless-escape": ["warn"],
|
@@ -232,16 +233,16 @@ const simpleImportSortRules = {
|
232 | 233 | ],
|
233 | 234 | // React comes first
|
234 | 235 | ["^react"],
|
235 |
| - ["^\\u0000"], |
| 236 | + [String.raw`^\u0000`], |
236 | 237 | // Internal packages.
|
237 | 238 | ["^(@squonk)(/.*|$)"],
|
238 |
| - ["^@?\\w"], |
| 239 | + [String.raw`^@?\w`], |
239 | 240 | // Side effect imports.
|
240 | 241 | // Parent imports. Put `..` last.
|
241 | 242 | // Other relative imports. Put same-folder imports and `.` last.
|
242 |
| - ["^\\.\\.(?!/?$)", "^\\.\\./?$", "^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"], |
| 243 | + [String.raw`^\.\.(?!/?$)`, String.raw`^\.\./?$`, String.raw`^\./(?=.*/)(?!/?$)`, String.raw`^\.(?!/?$)`, String.raw`^\./?$`], |
243 | 244 | // Style imports.
|
244 |
| - ["^.+\\.s?css$"], |
| 245 | + [String.raw`^.+\.s?css$`], |
245 | 246 | ],
|
246 | 247 | },
|
247 | 248 | ],
|
|
0 commit comments