|
| 1 | +import prettier from 'eslint-config-prettier'; |
| 2 | +import ts from 'typescript-eslint'; |
| 3 | +import globals from 'globals'; |
| 4 | + |
| 5 | +export default [ |
| 6 | + ...ts.configs.recommended, |
| 7 | + prettier, |
| 8 | + { |
| 9 | + ignores: ['**/node_modules/', '**/build/', '**/pnpm-lock.yaml'], |
| 10 | + languageOptions: { |
| 11 | + ecmaVersion: 2022, |
| 12 | + sourceType: 'module', |
| 13 | + globals: { |
| 14 | + ...globals.es2022, |
| 15 | + ...globals.node, |
| 16 | + guild: 'writable' |
| 17 | + } |
| 18 | + }, |
| 19 | + rules: { |
| 20 | + 'max-len': ['error', { code: 120, ignoreUrls: true, ignoreComments: true }], |
| 21 | + '@typescript-eslint/no-unused-vars': ['error', { args: 'none' }], |
| 22 | + 'no-constant-condition': ['error', { checkLoops: false }], |
| 23 | + 'prefer-const': ['warn', { destructuring: 'all' }], |
| 24 | + curly: ['warn', 'multi-line', 'consistent'], |
| 25 | + 'logical-assignment-operators': 'warn', |
| 26 | + 'no-template-curly-in-string': 'error', |
| 27 | + 'quote-props': ['error', 'as-needed'], |
| 28 | + 'comma-dangle': ['error', 'never'], |
| 29 | + 'no-useless-constructor': 'error', |
| 30 | + 'no-useless-assignment': 'error', |
| 31 | + 'no-inner-declarations': 'error', |
| 32 | + 'no-implicit-coercion': 'error', |
| 33 | + 'no-use-before-define': 'warn', |
| 34 | + 'no-underscore-dangle': 'warn', |
| 35 | + 'no-unneeded-ternary': 'error', |
| 36 | + 'default-param-last': 'error', |
| 37 | + 'one-var': ['warn', 'never'], |
| 38 | + 'no-inline-comments': 'warn', |
| 39 | + 'no-empty-function': 'error', |
| 40 | + 'no-useless-return': 'error', |
| 41 | + 'no-useless-rename': 'warn', |
| 42 | + 'no-useless-concat': 'warn', |
| 43 | + 'no-throw-literal': 'error', |
| 44 | + 'no-extend-native': 'error', |
| 45 | + 'default-case-last': 'warn', |
| 46 | + 'no-self-compare': 'error', |
| 47 | + 'no-new-wrappers': 'error', |
| 48 | + 'no-fallthrough': 'error', |
| 49 | + 'no-lone-blocks': 'error', |
| 50 | + 'no-undef-init': 'error', |
| 51 | + 'no-else-return': 'warn', |
| 52 | + 'no-extra-semi': 'error', |
| 53 | + 'require-await': 'warn', |
| 54 | + yoda: ['error', 'always'], |
| 55 | + 'default-case': 'error', |
| 56 | + 'dot-notation': 'error', |
| 57 | + 'no-sequences': 'warn', |
| 58 | + 'no-multi-str': 'warn', |
| 59 | + 'no-lonely-if': 'warn', |
| 60 | + 'no-new-func': 'error', |
| 61 | + 'no-console': 'error', |
| 62 | + camelcase: 'warn', |
| 63 | + 'no-var': 'warn', |
| 64 | + eqeqeq: 'warn', |
| 65 | + semi: 'error' |
| 66 | + } |
| 67 | + } |
| 68 | +]; |
0 commit comments