XeNote/.eslintrc.cjs

59 lines
1.3 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: [
{
env: {
node: true
},
files: [
'*.ts', '*.tsx'
2023-12-30 16:42:21 +00:00
],
excludeFiles: ['*.js', '*.jsx'],
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',
2023-12-30 16:42:21 +00:00
'@typescript-eslint/strict-boolean-expressions': [
2,
{
allowString: false,
allowNumber: false
}
]
},
ignorePatterns: ['src/**/*.test.ts', 'src/frontend/generated/*']
}