-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
48 lines (42 loc) · 1.32 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
module.exports = {
parserOptions: {
ecmaVersion: 2019,
sourceType: 'module',
},
plugins: ['svelte3'],
env: {
browser: true,
es6: true,
},
extends: [
'plugin:import/errors',
'plugin:import/warnings',
'plugin:node/recommended-module',
//'plugin:prettier/recommended', // This can't be used with the svelte plugin, but can be used directly :( See https://github.com/sveltejs/eslint-plugin-svelte3/blob/master/OTHER_PLUGINS.md
'plugin:unicorn/recommended',
],
overrides: [
{
files: ['**/*.svelte'],
processor: 'svelte3/svelte3',
},
],
rules: {
'prettier/prettier': 'error',
// Allow some flexibility here
'unicorn/prevent-abbreviations': 'off',
// Use camelCase for files (and directories - not enforced)
'unicorn/filename-case': ['error', { case: 'camelCase' }],
// Turn off explicit length checks
'unicorn/explicit-length-check': 'off',
// Turning off because it leads to many uses of the word 'error' in the same block, which is confusing
// E.g.
// } catch(error) {
// logger.error(error);
// return error(error);
// }
'unicorn/catch-error-name': 'off',
// This rule is no good for test specs. Need to find a way to disable this for test specs
'unicorn/consistent-function-scoping': 'off',
},
};