fix: 去掉eslint的prettier规则,生成的工程会因为这些规则大量报错
This commit is contained in:
26
.eslintrc.js
26
.eslintrc.js
@@ -5,41 +5,27 @@ module.exports = {
|
||||
'eslint:recommended',
|
||||
'plugin:react/recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'prettier',
|
||||
'prettier/prettier',
|
||||
'plugin:prettier/recommended',
|
||||
'plugin:react-hooks/recommended',
|
||||
'plugin:json/recommended',
|
||||
],
|
||||
parser: '@typescript-eslint/parser',
|
||||
plugins: ['react', '@typescript-eslint', 'simple-import-sort'],
|
||||
plugins: ['react', '@typescript-eslint'],
|
||||
rules: {
|
||||
'prettier/prettier': ['error', { singleQuote: true }],
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'off',
|
||||
{ argsIgnorePattern: ['^_', 'tocoServices'] },
|
||||
],
|
||||
'simple-import-sort/exports': 'error',
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
"@typescript-eslint/ban-types": 'off',
|
||||
'react-hooks/exhaustive-deps': 'error',
|
||||
'react/react-in-jsx-scope': 'off',
|
||||
'react/prop-types': 'off',
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
'react/no-children-prop': 'off',
|
||||
'import/no-anonymous-default-export': 'off',
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['**/*.js'],
|
||||
rules: {
|
||||
'react/no-children-prop': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/*.json'],
|
||||
rules: {
|
||||
'prettier/prettier': ['error', { singleQuote: false }],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/*.config.js', '**/setupProxy.js', 'script/**/*.js'],
|
||||
files: ['**/*.config.js'],
|
||||
rules: {
|
||||
'@typescript-eslint/no-var-requires': 'off',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user