fuware-be/frontend/.eslintrc.cjs

42 lines
1.0 KiB
JavaScript

module.exports = {
root: true,
env: { browser: true, es2021: true },
plugins: ['react-refresh'],
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: { react: { version: '18.2' } },
rules: {
'react/jsx-no-target-blank': 'off',
'react/prop-types': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'react-hooks/exhaustive-deps': 'off',
// indent: ['warn', 2],
quotes: ['error', 'single'],
semi: ['error', 'never'],
'max-lines-per-function': [1, 300],
'no-unused-vars': ['warn'],
'no-prototype-builtins': 'off',
'react/display-name': 'off',
},
}