Skip to content

Commit f25d259

Browse files
fixed the eslintrc file.
1 parent 9939c51 commit f25d259

9 files changed

+155
-155
lines changed

.eslintignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ node_modules
66
/lib
77
/esm
88
/cjs
9-
/browser
9+
/browser
10+
esm
11+
cjs

.eslintrc

-134
This file was deleted.

.eslintrc.js

-10
This file was deleted.

apps/parser/.eslintignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
node_modules
2+
.vscode
3+
.DS_Store
4+
/docs
5+
/coverage
6+
/lib
7+
/esm
8+
/cjs
9+
/browser
10+
esm
11+
cjs

apps/parser/.eslintrc

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"env": {
4+
"node": true,
5+
"es6": true,
6+
"jest": true,
7+
"mocha": true,
8+
"browser": true
9+
},
10+
"plugins": [
11+
"@typescript-eslint",
12+
"sonarjs",
13+
"security",
14+
"github"
15+
],
16+
"extends": [
17+
"eslint:recommended",
18+
"plugin:@typescript-eslint/eslint-recommended",
19+
"plugin:@typescript-eslint/recommended",
20+
"plugin:sonarjs/recommended",
21+
"plugin:security/recommended"
22+
],
23+
"parserOptions": {
24+
"ecmaVersion": 2018
25+
},
26+
"rules": {
27+
"strict": 0,
28+
"no-underscore-dangle": 0,
29+
"no-mixed-requires": 0,
30+
"no-process-exit": 0,
31+
"no-warning-comments": 0,
32+
"no-use-before-define": 0,
33+
"curly": 0,
34+
"no-multi-spaces": 0,
35+
"no-alert": 0,
36+
"consistent-return": 0,
37+
"consistent-this": [0, "self"],
38+
"func-style": 0,
39+
"max-nested-callbacks": 0,
40+
"camelcase": 0,
41+
"no-dupe-class-members": 0,
42+
"security/detect-object-injection": 0,
43+
"sonarjs/no-small-switch": 0,
44+
"sonarjs/no-nested-template-literals": 0,
45+
"no-debugger": 1,
46+
"no-empty": 1,
47+
"no-invalid-regexp": 1,
48+
"no-unused-expressions": 1,
49+
"no-native-reassign": 1,
50+
"no-fallthrough": 1,
51+
"sonarjs/cognitive-complexity": 1,
52+
"eqeqeq": 2,
53+
"no-undef": 2,
54+
"no-dupe-keys": 2,
55+
"no-empty-character-class": 2,
56+
"no-self-compare": 2,
57+
"valid-typeof": 2,
58+
"handle-callback-err": 2,
59+
"no-shadow-restricted-names": 2,
60+
"no-new-require": 2,
61+
"no-mixed-spaces-and-tabs": 2,
62+
"block-scoped-var": 2,
63+
"no-else-return": 2,
64+
"no-throw-literal": 2,
65+
"no-void": 2,
66+
"radix": 2,
67+
"wrap-iife": [2, "outside"],
68+
"no-shadow": 0,
69+
"no-path-concat": 2,
70+
"valid-jsdoc": [0, {"requireReturn": false, "requireParamDescription": false, "requireReturnDescription": false}],
71+
"no-spaced-func": 2,
72+
"semi-spacing": 2,
73+
"quotes": [2, "single"],
74+
"key-spacing": [2, {"beforeColon": false, "afterColon": true}],
75+
"indent": [2, 2],
76+
"no-lonely-if": 2,
77+
"no-floating-decimal": 2,
78+
"brace-style": [2, "1tbs", {"allowSingleLine": true}],
79+
"comma-style": [2, "last"],
80+
"no-multiple-empty-lines": [2, {"max": 1}],
81+
"no-nested-ternary": 2,
82+
"operator-assignment": [2, "always"],
83+
"padded-blocks": [2, "never"],
84+
"quote-props": [2, "as-needed"],
85+
"keyword-spacing": [2, {"before": true, "after": true, "overrides": {}}],
86+
"space-before-blocks": [2, "always"],
87+
"array-bracket-spacing": [2, "never"],
88+
"computed-property-spacing": [2, "never"],
89+
"space-in-parens": [2, "never"],
90+
"space-unary-ops": [2, {"words": true, "nonwords": false}],
91+
"wrap-regex": 2,
92+
"linebreak-style": 0,
93+
"semi": [2, "always"],
94+
"arrow-spacing": [2, {"before": true, "after": true}],
95+
"no-class-assign": 2,
96+
"no-const-assign": 2,
97+
"no-this-before-super": 2,
98+
"no-var": 2,
99+
"object-shorthand": [2, "always"],
100+
"prefer-arrow-callback": 2,
101+
"prefer-const": 2,
102+
"prefer-spread": 2,
103+
"prefer-template": 2,
104+
"@typescript-eslint/no-empty-interface": "off",
105+
"@typescript-eslint/no-use-before-define": ["off"],
106+
"@typescript-eslint/no-empty-function": "off",
107+
"@typescript-eslint/ban-ts-comment": "off",
108+
"@typescript-eslint/no-explicit-any": "off",
109+
"@typescript-eslint/explicit-module-boundary-types": "off",
110+
"@typescript-eslint/no-this-alias": "off",
111+
"@typescript-eslint/no-unnecessary-type-constraint": "off",
112+
"@typescript-eslint/ban-types": "off"
113+
},
114+
"overrides": [
115+
{
116+
"files": [
117+
"test/**",
118+
"*.spec.ts",
119+
"*.test.ts"
120+
],
121+
"rules": {
122+
"prefer-arrow-callback": 0,
123+
"sonarjs/no-duplicate-string": 0,
124+
"security/detect-object-injection": 0,
125+
"security/detect-non-literal-fs-filename": 0,
126+
"@typescript-eslint/no-non-null-assertion": 0,
127+
"@typescript-eslint/no-unused-vars": 0
128+
}
129+
}
130+
]
131+
}

apps/parser/src/iterator.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,4 +246,4 @@ function traverseMessageTrait(messageTrait: MessageTraitInterface, options: Trav
246246
if (schemaTypesToIterate.includes(SchemaTypesToIterate.Headers) && messageTrait.hasHeaders()) {
247247
traverseSchema(messageTrait.headers() as SchemaInterface, null, options);
248248
}
249-
}
249+
}

package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
"private": true,
44
"scripts": {
55
"test": "turbo run test",
6-
"lint":"turbo run lint",
6+
"lint": "turbo run lint",
7+
"lint:fix": "turbo run lint:fix",
78
"build": "turbo run build",
8-
"parser:test:unit":"turbo run test:unit --filter=@asyncapi/parser",
9-
"parser:test":"turbo run test --filter=@asyncapi/parser",
10-
"parser:test:browser":"turbo run test:browser --filter=@asyncapi/parser",
11-
"parser:build":"turbo run build --filter=@asyncapi/parser"
9+
"parser:test:unit": "turbo run test:unit --filter=@asyncapi/parser",
10+
"parser:test": "turbo run test --filter=@asyncapi/parser",
11+
"parser:test:browser": "turbo run test:browser --filter=@asyncapi/parser",
12+
"parser:build": "turbo run build --filter=@asyncapi/parser"
1213
},
1314
"devDependencies": {
1415
"@repo/eslint-config": "*",

tsconfig.json

-3
This file was deleted.

turbo.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
"test": {},
99
"test:unit": {},
1010
"test:integration": {},
11-
"test:browser":{}
11+
"test:browser": {},
12+
"lint": {},
13+
"lint:fix": {}
1214
}
1315
}

0 commit comments

Comments
 (0)