1
0
Fork 0
mirror of https://git.sr.ht/~ashkeel/strimertul synced 2024-09-18 01:50:50 +00:00
strimertul/frontend/.eslintrc.cjs

47 lines
1.4 KiB
JavaScript
Raw Normal View History

2021-05-02 12:29:43 +00:00
module.exports = {
parser: '@typescript-eslint/parser',
2023-04-14 18:04:21 +00:00
plugins: ['react-refresh', '@typescript-eslint', 'import'],
extends: [
'airbnb-base',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
],
root: true,
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
extraFileExtensions: ['.cjs'],
},
2021-05-02 12:29:43 +00:00
rules: {
'no-console': 0,
'import/extensions': 0,
'no-use-before-define': 'off',
2021-11-21 21:36:48 +00:00
'no-shadow': 'off',
'no-unused-vars': 'off',
'no-void': ['error', { allowAsStatement: true }],
2021-05-02 12:29:43 +00:00
'@typescript-eslint/no-use-before-define': ['error'],
2021-11-21 21:36:48 +00:00
'@typescript-eslint/no-shadow': ['error'],
2021-12-15 11:12:19 +00:00
'default-case': 'off',
2022-01-14 00:41:53 +00:00
'consistent-return': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { varsIgnorePattern: '^_' }],
2022-01-14 00:41:53 +00:00
'@typescript-eslint/no-unsafe-return': ['error'],
'@typescript-eslint/switch-exhaustiveness-check': ['error'],
'@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }],
2023-04-14 18:04:21 +00:00
'react-refresh/only-export-components': 'warn'
2021-05-02 12:29:43 +00:00
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
moduleDirectory: ['node_modules', 'src/'],
2021-05-02 12:29:43 +00:00
},
typescript: {},
},
},
env: {
browser: true,
},
ignorePatterns: ['OLD/*', 'wailsjs/*', 'dist/*'],
2021-05-02 12:29:43 +00:00
};