57 lines
1.2 KiB
JavaScript
57 lines
1.2 KiB
JavaScript
module.exports = {
|
|
env: {
|
|
browser: true,
|
|
es2021: true
|
|
},
|
|
extends: [
|
|
'eslint:recommended',
|
|
'standard-with-typescript',
|
|
'plugin:@typescript-eslint/recommended',
|
|
'plugin:react/recommended',
|
|
'next/core-web-vitals'
|
|
],
|
|
overrides: [
|
|
{
|
|
env: {
|
|
node: true
|
|
},
|
|
files: [
|
|
'.eslintrc.{js,cjs}'
|
|
],
|
|
parserOptions: {
|
|
sourceType: 'script'
|
|
}
|
|
}
|
|
],
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
ecmaVersion: 'latest',
|
|
sourceType: 'module',
|
|
project: [
|
|
'./tsconfig.json'
|
|
]
|
|
},
|
|
plugins: [
|
|
'react',
|
|
'@typescript-eslint'
|
|
],
|
|
rules: {
|
|
'no-trailing-spaces': 'warn',
|
|
'space-before-function-paren': 'off',
|
|
'@typescript-eslint/space-before-blocks': 'off',
|
|
'no-multi-spaces': 'warn',
|
|
'@typescript-eslint/no-this-alias': 'off',
|
|
'@typescript-eslint/space-infix-ops': 'warn',
|
|
'@typescript-eslint/space-before-function-paren': 'off',
|
|
'@typescript-eslint/explicit-function-return-type': 'warn',
|
|
'@typescript-eslint/strict-boolean-expressions': [
|
|
2,
|
|
{
|
|
allowString: false,
|
|
allowNumber: false
|
|
}
|
|
]
|
|
},
|
|
ignorePatterns: ['src/**/*.test.ts', 'src/frontend/generated/*']
|
|
}
|