maccounter
/
.eslintrc.js
119 строк · 3.5 Кб
1const indent = [2, 4]2
3module.exports = {4globals: {5JSX: 'readonly',6},7env: {8browser: true,9es2021: true,10jest: true,11},12extends: [13'plugin:jest/recommended',14'plugin:react/recommended',15'plugin:json/recommended',16'plugin:@typescript-eslint/recommended',17'airbnb',18'airbnb/rules/react',19'airbnb/rules/react-hooks',20'plugin:css-modules/recommended',21],22parser: '@typescript-eslint/parser',23parserOptions: {24ecmaFeatures: {25jsx: true,26},27ecmaVersion: 12,28sourceType: 'module',29project: './tsconfig.json',30},31settings: {32react: {33version: 'detect',34},35'import/resolver': {36typescript: {37alwaysTryTypes: true,38project: './tsconfig.json',39},40node: {41extensions: ['.ts', '.tsx', '.js', '.jsx', '.svg'],42},43},44},45plugins: [46'react',47'@typescript-eslint',48'import',49'css-modules',50],51rules: {52'no-shadow': 0,53'no-unused-vars': 0,54'@typescript-eslint/no-shadow': [2],55'import/extensions': [2, 'never', {56svg: 'always',57json: 'always'58}],59'import/no-extraneous-dependencies': 0,60'import/prefer-default-export': 0,61'react/jsx-filename-extension': [2, { extensions: ['.tsx'] }],62'object-curly-newline': 0,63'max-len': [1, {64code: 120,65tabWidth: 4,66ignoreUrls: true,67ignoreComments: true,68ignorePattern: 'd\..*$'69}],70indent: 0,71'react/jsx-indent': indent,72'react/jsx-indent-props': indent,73curly: ['error', 'all'],74'@typescript-eslint/indent': indent,75'@typescript-eslint/member-delimiter-style': [2, {76multiline: {77delimiter: 'none',78},79singleline: {80delimiter: 'comma',81}82}],83'@typescript-eslint/no-unused-vars': [1, {84argsIgnorePattern: '_'85}],86'jsx-a11y/label-has-associated-control': [0, {87labelComponents: ['CustomInputLabel'],88labelAttributes: ['label'],89controlComponents: ['CustomInput'],90depth: 3,91}],92'jsx-a11y/no-static-element-interactions': 0,93'jsx-a11y/click-events-have-key-events': 0,94'jsx-a11y/no-noninteractive-element-interactions': 0,95'react/jsx-props-no-spreading': 0,96'no-use-before-define': 0,97'react/prop-types': 0,98'@typescript-eslint/consistent-type-exports': 2,99'jest/valid-title': [1, {100ignoreTypeOfDescribeName: true,101}],102'jest/no-done-callback': 1,103'jest/no-export': 0,104'react/jsx-uses-react': 0,105'react/react-in-jsx-scope': 0,106'react/jsx-fragments': [2, 'element'],107'react/no-unknown-property': [2, {108ignore: ['css']109}],110'react/function-component-definition': 0,111'react/jsx-no-useless-fragment': 1,112'react/no-unstable-nested-components': 1,113'react/require-default-props': 0,114'react/jsx-no-constructed-context-values': 1,115'css-modules/no-unused-class': [1, { camelCase: true }],116'css-modules/no-undef-class': [1, { camelCase: true }],117'semi': 0,118},119}
120