UNPKG

@vitalik2060/demo-lint

Version:

64 lines (61 loc) 1.58 kB
module.exports = { extends: [ 'airbnb', '@kesills/airbnb-typescript', 'airbnb/hooks', 'plugin:@typescript-eslint/recommended', 'plugin:react/jsx-runtime', 'prettier', './base.js', ], plugins: [ 'react-hooks', '@typescript-eslint', 'import', 'react', 'cypress', 'simple-import-sort', 'dirnames', 'unicorn', 'jsx-a11y', 'react-refresh', ], parserOptions: { ecmaVersion: 2020, ecmaFeatures: { jsx: true, }, }, env: { browser: true, es2020: true, }, settings: { react: { version: 'detect', }, }, rules: { 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], // React 'react/jsx-fragments': ['warn', 'element'], 'react/static-property-placement': ['error', 'static public field'], 'react/state-in-constructor': ['error', 'never'], 'react/prop-types': 'off', 'react/sort-comp': 'off', 'react/require-default-props': 'off', 'react/jsx-boolean-value': ['error', 'always'], 'react/jsx-props-no-spreading': 'off', 'react/prefer-stateless-function': 'off', 'react/destructuring-assignment': 'off', 'react/jsx-filename-extension': [1, { extensions: ['.jsx', '.tsx'] }], 'react/jsx-one-expression-per-line': 'off', 'react/function-component-definition': 'off', // A11Y 'jsx-a11y/anchor-is-valid': ['warn', { aspects: ['invalidHref'] }], 'jsx-a11y/label-has-associated-control': [ 'error', { labelComponents: ['label'], assert: 'either' }, ], }, };