forked from okta/okta-auth-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
151 lines (151 loc) · 3.73 KB
/
.eslintrc.json
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
{
"extends": [
"eslint:recommended",
"plugin:node/recommended-script",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jsdoc/recommended"
],
"env": {
"browser": false,
"commonjs": true,
"node": true
},
"globals": {
"Promise": true,
"console": true,
"setTimeout": true,
"clearTimeout": true,
"setInterval": true,
"clearInterval": true
},
"settings": {
"jsdoc": {
"mode": "typescript",
"definedTags": [
"type"
]
}
},
"overrides": [
{
"files": ["polyfill/**/*", "build/polyfill/**/*"],
"env": {
"browser": true
},
"rules": {
"node/no-unsupported-features/node-builtins": ["error", {
"ignores": ["TextEncoder", "TextDecoder"]
}]
}
},
{
"files": ["test/types/*.ts"],
"env": {
"browser": true,
"node": true
},
"rules": {
"node/no-unsupported-features/es-syntax": 0,
"node/no-extraneous-import": 0,
"no-unused-vars": 0,
"@typescript-eslint/no-unused-vars": 0,
"max-statements": 0
}
},
{
"files": ["build/**/*.js"],
"rules": {
"node/no-unpublished-require": 1,
"node/no-unpublished-import": 1
}
},
{
"files": ["{lib,build/lib}/{browser/*,crypto,oidc/util/pkce}.{js,ts}"],
"rules": {
"node/no-unsupported-features/node-builtins": ["error", {
"ignores": ["TextEncoder"]
}]
}
},
{
"files": [
"lib/**/*"
],
"plugins": [
"@typescript-eslint",
"jsdoc"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"tsconfigRootDir": "./"
},
"rules": {
"node/no-missing-import": ["error", {
"allowModules": [
"@okta/okta-auth-js"
],
"tryExtensions": [".js", ".ts"]
}]
}
}
],
"rules": {
"no-var": 0,
"prefer-rest-params": 0,
"prefer-spread": 0,
"prefer-const": 0,
"node/no-unpublished-require": 0,
"node/no-unpublished-import": 0,
"camelcase": 2,
"complexity": [2, 7],
"curly": 2,
"dot-notation": 0,
"guard-for-in": 2,
"new-cap": [2, { "properties": false }],
"no-caller": 2,
"no-empty": 2,
"no-eval": 2,
"no-implied-eval": 2,
"no-multi-str": 0,
"no-new": 2,
"no-plusplus": 0,
"no-undef": 2,
"no-use-before-define": [2, "nofunc"],
"no-unused-expressions": [2, { "allowShortCircuit": true, "allowTernary": true }],
"no-unused-vars": 2,
"max-depth": [2, 3],
"max-len": [2, 120],
"max-params": [2, 5],
"max-statements": [2, 25],
"quotes": [2, "single", { "allowTemplateLiterals": true }],
"semi": 2,
"strict": 0,
"wrap-iife": [2, "any"],
"no-throw-literal": 2,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/camelcase": 0,
"@typescript-eslint/no-this-alias": 0,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-use-before-define": 0,
"@typescript-eslint/ban-ts-ignore": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/interface-name-prefix": 0,
"@typescript-eslint/triple-slash-reference": 0,
"jsdoc/require-jsdoc": 0,
"jsdoc/require-param": 0,
"jsdoc/require-returns-description": 0,
"jsdoc/require-param-description": 0,
"jsdoc/require-returns": 0,
"jsdoc/no-undefined-types": 0,
"node/no-extraneous-require": ["error", {
"allowModules": [
"@okta/okta-auth-js",
"@okta/env"
]
}]
},
"root": true
}