2021-02-09 20:35:33 +01:00
|
|
|
module.exports = {
|
|
|
|
parser: '@babel/eslint-parser',
|
2022-02-26 20:11:00 +01:00
|
|
|
extends: ['eslint:recommended', 'preact', 'prettier'],
|
|
|
|
plugins: ['react', 'jest'],
|
|
|
|
env: {
|
|
|
|
browser: true,
|
|
|
|
node: true,
|
|
|
|
mocha: true,
|
|
|
|
es6: true,
|
|
|
|
'jest/globals': true,
|
|
|
|
},
|
2021-02-09 20:35:33 +01:00
|
|
|
parserOptions: {
|
|
|
|
ecmaFeatures: {
|
2022-02-26 20:11:00 +01:00
|
|
|
modules: true,
|
2021-02-09 20:35:33 +01:00
|
|
|
jsx: true,
|
|
|
|
},
|
|
|
|
},
|
2022-02-26 20:11:00 +01:00
|
|
|
settings: {
|
|
|
|
react: {
|
|
|
|
pragma: 'h',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
globals: {
|
|
|
|
sleep: true,
|
2021-02-09 20:35:33 +01:00
|
|
|
},
|
|
|
|
rules: {
|
2021-02-11 16:16:35 +01:00
|
|
|
indent: ['error', 2, { SwitchCase: 1 }],
|
2022-02-26 20:11:00 +01:00
|
|
|
'comma-dangle': ['error', { objects: 'always-multiline', arrays: 'always-multiline' }],
|
|
|
|
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
2021-02-09 20:35:33 +01:00
|
|
|
},
|
2022-02-27 15:04:12 +01:00
|
|
|
overrides: [
|
|
|
|
{
|
2022-02-26 20:11:00 +01:00
|
|
|
files: ['**/*.{ts,tsx}'],
|
2022-02-27 15:04:12 +01:00
|
|
|
parser: '@typescript-eslint/parser',
|
|
|
|
plugins: ['@typescript-eslint'],
|
2022-02-26 20:11:00 +01:00
|
|
|
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
|
2022-02-27 15:04:12 +01:00
|
|
|
},
|
|
|
|
],
|
2021-02-09 20:35:33 +01:00
|
|
|
};
|