Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Adds eslint rules in eslintrc #3173

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* limitations under the License.
*
*/
const path = require('path');

module.exports = {
"env": {
Expand Down Expand Up @@ -49,9 +50,20 @@ module.exports = {
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/semi": "off",
"@typescript-eslint/no-var-requires": "warn",
konstantinabl marked this conversation as resolved.
Show resolved Hide resolved
"@typescript-eslint/ban-types": "warn",
"no-trailing-spaces": "error",
"no-prototype-builtins": "warn",
"prefer-const": "error",
"no-unsafe-optional-chaining": "warn",
"comma-dangle": [2, "only-multiline"],
"semi": [2, "always"]
}
"semi": [2, "always"],
"sort-imports": ["error", {
"ignoreCase": true,
"ignoreDeclarationSort": true,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"],
}],
},
};
20 changes: 0 additions & 20 deletions .eslintrc.yml

This file was deleted.

50 changes: 26 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"@types/co-body": "6.1.0",
"@types/find-config": "^1.0.4",
"@types/koa-cors": "^0.0.6",
"@types/sinon": "^10.0.20",
"@types/lodash": "^4.17.7",
"@types/sinon": "^10.0.20",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"ajv": "^8.16.0",
Expand Down Expand Up @@ -92,8 +92,8 @@
"lerna": "^8.1.8",
"pino": "^7.11.0",
"pino-pretty": "^7.6.1",
"prom-client": "^14.0.1",
"pnpm": "^8.7.1",
"prom-client": "^14.0.1",
"redis": "^4.7.0"
},
"overrides": {
Expand Down
2 changes: 1 addition & 1 deletion packages/config-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build": "pnpm run clean && pnpm run compile",
"clean": "rm -rf ./dist && rm -rf tsconfig.tsbuildinfo",
"compile": "tsc -b tsconfig.json",
"lint": "npx eslint --ext .js,.ts .",
"lint": "npx eslint --ext .js,.ts . --ignore-path ../../.eslintignore",
"format": "npx prettier --ignore-path ../../.gitignore --write \"**/*.+(js|ts|json)\"",
"test": "nyc ts-mocha --recursive './tests/**/*.spec.ts' './tests/**/**/*.spec.ts' --exit",
"print-env": "node src/commands/printEnvs.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/relay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"build": "pnpm run clean && pnpm run compile",
"clean": "rm -rf ./dist && rm -rf tsconfig.tsbuildinfo",
"compile": "tsc -b tsconfig.json",
"lint": "npx eslint --ext .js,.ts .",
"lint": "npx eslint --ext .js,.ts . --ignore-path ../../.eslintignore",
"format": "npx prettier --ignore-path ../../.gitignore --write \"**/*.+(js|ts|json)\"",
"test": "nyc ts-mocha --recursive './tests/**/*.spec.ts' './tests/**/**/*.spec.ts' --exit",
"test-eth": "nyc ts-mocha --recursive './tests/lib/eth/**/*.spec.ts' --exit",
Expand Down
1 change: 1 addition & 0 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"clean": "rm -rf ./dist && rm -rf tsconfig.tsbuildinfo",
"compile": "tsc -b tsconfig.json",
"acceptancetest": "nyc ts-mocha tests/acceptance/index.spec.ts",
"lint": "npx eslint --ext .js,.ts . --ignore-path ../../.eslintignore",
"start": "node dist/index.js",
"test": "nyc ts-mocha --recursive './tests/integration/*.spec.ts' './tests/integration/**/*.spec.ts' --exit"
},
Expand Down
1 change: 1 addition & 0 deletions packages/ws-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"compile": "tsc -b tsconfig.json",
"acceptancetest": "nyc ts-mocha tests/acceptance/index.spec.ts",
"start": "node dist/index.js",
"lint": "npx eslint --ext .js,.ts . --ignore-path ../../.eslintignore",
"test": "nyc ts-mocha --recursive './tests/unit/**/*.spec.ts' --exit"
},
"nyc": {
Expand Down
Loading