|
1 | 1 | module.exports = {
|
2 | 2 | root: true,
|
3 |
| - parser: "@typescript-eslint/parser", |
4 |
| - plugins: ["@typescript-eslint", "prettier"], |
5 |
| - extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"], |
| 3 | + parser: '@typescript-eslint/parser', |
| 4 | + plugins: ['@typescript-eslint', 'prettier', 'simple-import-sort', 'import'], |
| 5 | + extends: [ |
| 6 | + 'eslint:recommended', |
| 7 | + 'plugin:@typescript-eslint/recommended', |
| 8 | + 'prettier/prettier', |
| 9 | + 'plugin:import/recommended', |
| 10 | + 'plugin:import/typescript', |
| 11 | + ], |
6 | 12 | ignorePatterns: [
|
7 |
| - ".eslintrc.js", |
8 |
| - "dist", |
9 |
| - "node_modules", |
10 |
| - "rust-wasm", |
11 |
| - "scripts", |
| 13 | + '.eslintrc.js', |
| 14 | + 'dist', |
| 15 | + 'node_modules', |
| 16 | + 'rust-wasm', |
| 17 | + 'scripts', |
| 18 | + 'prettier.config.js', |
12 | 19 | ],
|
13 | 20 | rules: {
|
14 |
| - "comma-spacing": ["error", { before: false, after: true }], |
15 |
| - "no-unused-vars": "off", |
16 |
| - "@typescript-eslint/no-unused-vars": [ |
17 |
| - "warn", |
| 21 | + 'comma-spacing': ['error', { before: false, after: true }], |
| 22 | + 'no-unused-vars': 'off', |
| 23 | + '@typescript-eslint/no-unused-vars': [ |
| 24 | + 'warn', |
18 | 25 | {
|
19 |
| - argsIgnorePattern: "^_", |
20 |
| - varsIgnorePattern: "^_", |
21 |
| - caughtErrorsIgnorePattern: "^_", |
| 26 | + argsIgnorePattern: '^_', |
| 27 | + varsIgnorePattern: '^_', |
| 28 | + caughtErrorsIgnorePattern: '^_', |
22 | 29 | },
|
23 | 30 | ],
|
24 |
| - "prettier/prettier": "error", |
| 31 | + 'prettier/prettier': 'error', |
| 32 | + 'import/order': [ |
| 33 | + 'error', |
| 34 | + { |
| 35 | + alphabetize: { |
| 36 | + order: 'asc', |
| 37 | + }, |
| 38 | + groups: ['object', ['builtin', 'external'], 'parent', 'sibling', 'index', 'type'], |
| 39 | + 'newlines-between': 'always', |
| 40 | + }, |
| 41 | + ], |
| 42 | + }, |
| 43 | + parserOptions: { |
| 44 | + extraFileExtensions: ['.json'], |
| 45 | + project: '../tsconfig.json', |
25 | 46 | },
|
26 |
| -}; |
| 47 | +} |
0 commit comments