-
Notifications
You must be signed in to change notification settings - Fork 187
/
Copy patheslint.config.js
74 lines (73 loc) · 2.15 KB
/
eslint.config.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import eslintPlugin from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import googleappsscript from 'eslint-plugin-googleappsscript';
import importPlugin from 'eslint-plugin-import';
import prettierPlugin from 'eslint-plugin-prettier';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import pluginSimpleImportSort from 'eslint-plugin-simple-import-sort';
import globals from 'globals';
export default [
eslintPlugin.configs.recommended,
eslintConfigPrettier,
eslintPluginPrettierRecommended,
{ ignores: ['dist/**', 'build/**', 'node_modules/**'] },
{
files: ['**/*.js'],
ignores: ['node_modules/**', 'dist/**', 'build/**'],
plugins: {
prettier: prettierPlugin,
import: importPlugin,
'simple-import-sort': pluginSimpleImportSort,
googleappsscript: googleappsscript,
},
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
OAuth1: true,
OAuth2: true,
google: true,
...globals.node,
...googleappsscript.environments.googleappsscript.globals,
},
},
rules: {
...importPlugin.configs.recommended.rules,
'no-continue': 'off',
'no-console': 'warn',
'no-underscore-dangle': 'off',
'prefer-template': 'error',
camelcase: 'off',
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': 'warn',
'import/extensions': ['error', 'ignorePackages'],
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
'newlines-between': 'always',
alphabetize: { order: 'asc' },
},
],
'no-unused-vars': [
'warn',
{
ignoreRestSiblings: true,
argsIgnorePattern: 'res|next|^err|^ignore|^_',
caughtErrors: 'none',
},
],
'prettier/prettier': [
'error',
{
trailingComma: 'es5',
singleQuote: true,
printWidth: 120,
endOfLine: 'auto',
semi: true,
tabWidth: 2,
},
],
},
},
];