Last active
August 27, 2023 07:25
-
-
Save zzzz465/9c1a5d39431ab7dae46acb6dff95bd34 to your computer and use it in GitHub Desktop.
my eslint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable @typescript-eslint/naming-convention */ | |
module.exports = { | |
parser: '@typescript-eslint/parser', | |
parserOptions: {}, | |
plugins: ['@typescript-eslint', 'import', 'unused-imports'], | |
extends: [ | |
'standard', | |
'eslint:recommended', | |
'plugin:@typescript-eslint/eslint-recommended', | |
'plugin:@typescript-eslint/recommended', | |
'plugin:import/recommended', | |
'plugin:import/typescript', | |
// react related | |
// 'plugin:react/recommended', | |
// 'plugin:react/jsx-runtime', | |
], | |
settings: { | |
'import/parsers': { | |
'@typescript-eslint/parser': ['.ts', '.tsx'], | |
} | |
}, | |
rules: { | |
'@typescript-eslint/naming-convention': 'warn', | |
'@typescript-eslint/interface-name-prefix': 'off', | |
'no-case-declarations': 'error', | |
'no-underscore-dangle': 'off', | |
'no-restricted-syntax': ['off'], | |
'func-names': ['off'], | |
'import/prefer-default-export': 'off', | |
'comma-dangle': ['warn', 'only-multiline'], | |
'max-len': ['warn', { code: 100, ignorePattern: '^import\\.*' }], | |
'function-call-argument-newline': ['warn', 'consistent'], | |
'function-paren-newline': ['warn', 'consistent'], | |
'@typescript-eslint/member-delimiter-style': ['warn', { | |
multiline: { | |
delimiter: 'none' | |
} | |
}], | |
'@typescript-eslint/no-unused-vars': [ | |
'warn', | |
{ | |
argsIgnorePattern: '^_', | |
varsIgnorePattern: '^_', | |
caughtErrorsIgnorePattern: '^_' | |
} | |
], | |
'no-new': 'off', | |
'unused-imports/no-unused-imports': 'warn', | |
'import/order': [ | |
'error', | |
{ | |
groups: ['builtin', 'external', 'parent', 'sibling', 'index'], | |
'newlines-between': 'always' | |
}, | |
], | |
'padding-line-between-statements': [ | |
'warn', | |
{ | |
// require blank line after end of import statements | |
blankLine: 'always', | |
prev: 'import', | |
next: [ | |
'block-like', | |
'class', | |
'const', | |
'export', | |
'expression' | |
] | |
} | |
], | |
'import/no-unresolved': 'off', | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment