XeNote/.eslintrc.cjs

49 lines
1.2 KiB
JavaScript
Raw Normal View History

2023-12-30 16:42:21 +00:00
module.exports = {
env: {
browser: true,
es2021: true
},
extends: [
'eslint:recommended',
'standard-with-typescript',
'plugin:@typescript-eslint/recommended',
2024-01-07 16:22:37 +00:00
'plugin:react/recommended',
'next/core-web-vitals'
2023-12-30 16:42:21 +00:00
],
overrides: [
{
2024-01-07 18:05:04 +00:00
env: { node: true },
files: ['*.ts', '*.tsx'],
2023-12-30 16:42:21 +00:00
parserOptions: {
sourceType: 'script'
}
}
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: [
'./tsconfig.json'
]
},
plugins: [
'react',
'@typescript-eslint'
],
rules: {
2024-01-07 16:22:37 +00:00
'no-trailing-spaces': 'warn',
2023-12-30 16:42:21 +00:00
'space-before-function-paren': 'off',
2024-01-07 16:22:37 +00:00
'@typescript-eslint/space-before-blocks': 'off',
'no-multi-spaces': 'warn',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/space-infix-ops': 'warn',
2023-12-30 16:42:21 +00:00
'@typescript-eslint/space-before-function-paren': 'off',
2024-01-07 16:22:37 +00:00
'@typescript-eslint/explicit-function-return-type': 'warn',
'@typescript-eslint/no-extraneous-class': 'off',
2024-01-07 18:05:04 +00:00
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off'
2023-12-30 16:42:21 +00:00
},
2024-01-07 18:05:04 +00:00
ignorePatterns: ['**/*.js*', 'src/**/*.test.ts', 'src/frontend/generated/*']
2023-12-30 16:42:21 +00:00
}