|
| 1 | +import eslintGlobalConfig from "../../eslint.config.mjs"; |
| 2 | + |
| 3 | +export default [ |
| 4 | + ...eslintGlobalConfig, |
| 5 | + { |
| 6 | + rules: { |
| 7 | + indent: ["error", 2], |
| 8 | + 'padding-line-between-statements': [ |
| 9 | + 'error', |
| 10 | + // Blank line between "use strict" (or other directives) and imports |
| 11 | + { blankLine: 'always', prev: 'directive', next: 'import' }, |
| 12 | + |
| 13 | + // No blank lines between import statements |
| 14 | + { blankLine: 'never', prev: 'import', next: 'import' }, |
| 15 | + |
| 16 | + // One blank line after the last import statement |
| 17 | + { |
| 18 | + blankLine: 'always', |
| 19 | + prev: 'import', |
| 20 | + next: ['const', 'let', 'var', 'function', 'expression', 'if', 'block', 'class', 'export', 'block-like'] |
| 21 | + }, |
| 22 | + |
| 23 | + { blankLine: 'always', prev: '*', next: 'return' }, |
| 24 | + { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' }, |
| 25 | + { blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] }, |
| 26 | + { blankLine: 'always', prev: '*', next: 'block-like' } |
| 27 | + ], |
| 28 | + "no-unused-vars": [ |
| 29 | + "error", |
| 30 | + { |
| 31 | + argsIgnorePattern: "^_", |
| 32 | + varsIgnorePattern: "^_", |
| 33 | + ignoreRestSiblings: true, |
| 34 | + }, |
| 35 | + ], |
| 36 | + 'prefer-const': ['error', { ignoreReadBeforeAssign: true }], |
| 37 | + }, |
| 38 | + }, |
| 39 | +]; |
0 commit comments