@@ -2,50 +2,64 @@ module.exports = {
2
2
plugins : [
3
3
"@typescript-eslint" ,
4
4
"header" ,
5
- "import"
6
- ] ,
7
- extends : [
8
- "./node_modules/gts" ,
5
+ "node" ,
6
+ "prettier"
9
7
] ,
8
+ extends : [ "eslint:recommended" , "plugin:@typescript-eslint/recommended" , "plugin:prettier/recommended" ] ,
10
9
parser : "@typescript-eslint/parser" ,
11
10
parserOptions : {
12
- "project" : "./tsconfig.json"
11
+ "project" : "./tsconfig.json"
13
12
} ,
14
13
rules : {
15
- "quotes" : [ 2 , "single" , { "avoidEscape" : true } ] ,
16
- "@typescript-eslint/no-this-alias" : "off" ,
14
+ "quotes" : [ "error" , "single" , { "avoidEscape" : true } ] ,
17
15
"eqeqeq" : "off" ,
18
16
"prefer-rest-params" : "off" ,
19
- "@typescript-eslint/naming-convention" : [
20
- "error" ,
21
- {
22
- "selector" : "memberLike" ,
23
- "modifiers" : [ "private" , "protected" ] ,
24
- "format" : [ "camelCase" ] ,
25
- "leadingUnderscore" : "require"
26
- }
27
- ] ,
28
- "@typescript-eslint/no-inferrable-types" : [ "error" , { ignoreProperties : true } ] ,
29
- "arrow-parens" : [ "error" , "as-needed" ] ,
30
- "prettier/prettier" : [ "error" , { "singleQuote" : true , "arrowParens" : "avoid" } ] ,
17
+ "no-shadow" : "off" ,
31
18
"node/no-deprecated-api" : [ "warn" ] ,
32
- "header/header" : [ 2 , "block" , [ {
33
- pattern : / \* C o p y r i g h t T h e O p e n T e l e m e t r y A u t h o r s [ \r \n ] + \* [ \r \n ] + \* L i c e n s e d u n d e r t h e A p a c h e L i c e n s e , V e r s i o n 2 \. 0 \( t h e \" L i c e n s e \" \) ; [ \r \n ] + \* y o u m a y n o t u s e t h i s f i l e e x c e p t i n c o m p l i a n c e w i t h t h e L i c e n s e \. [ \r \n ] + \* Y o u m a y o b t a i n a c o p y o f t h e L i c e n s e a t [ \r \n ] + \* [ \r \n ] + \* h t t p s : \/ \/ w w w \. a p a c h e \. o r g \/ l i c e n s e s \/ L I C E N S E - 2 \. 0 [ \r \n ] + \* [ \r \n ] + \* U n l e s s r e q u i r e d b y a p p l i c a b l e l a w o r a g r e e d t o i n w r i t i n g , s o f t w a r e [ \r \n ] + \* d i s t r i b u t e d u n d e r t h e L i c e n s e i s d i s t r i b u t e d o n a n \" A S I S \" B A S I S , [ \r \n ] + \* W I T H O U T W A R R A N T I E S O R C O N D I T I O N S O F A N Y K I N D , e i t h e r e x p r e s s o r i m p l i e d \. [ \r \n ] + \* S e e t h e L i c e n s e f o r t h e s p e c i f i c l a n g u a g e g o v e r n i n g p e r m i s s i o n s a n d [ \r \n ] + \* l i m i t a t i o n s u n d e r t h e L i c e n s e \. / gm,
34
- template :
19
+ "header/header" : [ "error" , "block" , [ {
20
+ pattern : / \* C o p y r i g h t T h e O p e n T e l e m e t r y A u t h o r s [ \r \n ] + \* [ \r \n ] + \* L i c e n s e d u n d e r t h e A p a c h e L i c e n s e , V e r s i o n 2 \. 0 \( t h e \" L i c e n s e \" \) ; [ \r \n ] + \* y o u m a y n o t u s e t h i s f i l e e x c e p t i n c o m p l i a n c e w i t h t h e L i c e n s e \. [ \r \n ] + \* Y o u m a y o b t a i n a c o p y o f t h e L i c e n s e a t [ \r \n ] + \* [ \r \n ] + \* h t t p s : \/ \/ w w w \. a p a c h e \. o r g \/ l i c e n s e s \/ L I C E N S E - 2 \. 0 [ \r \n ] + \* [ \r \n ] + \* U n l e s s r e q u i r e d b y a p p l i c a b l e l a w o r a g r e e d t o i n w r i t i n g , s o f t w a r e [ \r \n ] + \* d i s t r i b u t e d u n d e r t h e L i c e n s e i s d i s t r i b u t e d o n a n \" A S I S \" B A S I S , [ \r \n ] + \* W I T H O U T W A R R A N T I E S O R C O N D I T I O N S O F A N Y K I N D , e i t h e r e x p r e s s o r i m p l i e d \. [ \r \n ] + \* S e e t h e L i c e n s e f o r t h e s p e c i f i c l a n g u a g e g o v e r n i n g p e r m i s s i o n s a n d [ \r \n ] + \* l i m i t a t i o n s u n d e r t h e L i c e n s e \. / gm,
21
+ template :
35
22
`\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n `
36
- } ] ] ,
37
- "import/no-extraneous-dependencies" : [ "error" , { devDependencies : [ "test/**/*.ts" ] } ] ,
23
+ } ] ]
38
24
} ,
39
25
overrides : [
40
26
{
41
- "files" : [ "test/**/*.ts" ] ,
42
- "rules" : {
27
+ files : [ '*.ts' ] ,
28
+ rules : {
29
+ "@typescript-eslint/no-this-alias" : "off" ,
30
+ "@typescript-eslint/naming-convention" : [
31
+ "error" ,
32
+ {
33
+ "selector" : "memberLike" ,
34
+ "modifiers" : [ "private" , "protected" ] ,
35
+ "format" : [ "camelCase" ] ,
36
+ "leadingUnderscore" : "require"
37
+ }
38
+ ] ,
39
+ "@typescript-eslint/no-var-requires" : "off" ,
40
+ "@typescript-eslint/no-inferrable-types" : [ "error" , { ignoreProperties : true } ] ,
41
+ "@typescript-eslint/no-empty-function" : [ "off" ] ,
42
+ "@typescript-eslint/ban-types" : [ "warn" , {
43
+ "types" : {
44
+ "Function" : null ,
45
+ }
46
+ } ] ,
47
+ "@typescript-eslint/no-shadow" : [ "warn" ] ,
48
+ }
49
+ } ,
50
+ {
51
+ files : [ "test/**/*.ts" ] ,
52
+ rules : {
43
53
"no-empty" : "off" ,
44
54
"@typescript-eslint/ban-ts-ignore" : "off" ,
45
55
"@typescript-eslint/no-empty-function" : "off" ,
46
56
"@typescript-eslint/no-explicit-any" : "off" ,
47
57
"@typescript-eslint/no-unused-vars" : "off" ,
48
- "@typescript-eslint/no-var-requires" : "off"
58
+ "@typescript-eslint/no-var-requires" : "off" ,
59
+ "@typescript-eslint/no-shadow" : [ "off" ] ,
60
+ "@typescript-eslint/no-floating-promises" : [ "off" ] ,
61
+ "@typescript-eslint/no-non-null-assertion" : [ "off" ] ,
62
+ "@typescript-eslint/explicit-module-boundary-types" : [ "off" ]
49
63
}
50
64
}
51
65
]
0 commit comments