Skip to content

Commit

Permalink
Dedupe eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
LogvinovLeon committed Feb 14, 2024
1 parent b982543 commit f2b1691
Show file tree
Hide file tree
Showing 9 changed files with 196 additions and 275 deletions.
46 changes: 46 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
module.exports = {
root: true,
ignorePatterns: ['**/.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json'
},
env: {
es2021: true
},
extends: ['plugin:@typescript-eslint/recommended', 'prettier', 'plugin:prettier/recommended'],
rules: {
// Override specific rules
'@typescript-eslint/consistent-type-assertions': [
'error',
{
assertionStyle: 'as',
objectLiteralTypeAssertions: 'allow'
}
],
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'json-bigint',
message: 'Use ./src/utils/json-bigint instead'
}
]
}
]
},
overrides: [
{
env: {
node: true
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script'
}
}
]
};
263 changes: 118 additions & 145 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file modified .yarn/install-state.gz
Binary file not shown.
55 changes: 13 additions & 42 deletions ethereum_history_api/oracles/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,44 +1,15 @@
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: "./tsconfig.json",
},
env: {
browser: true,
es2021: true,
},
extends: [
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended",
],
rules: {
// Override specific rules
"@typescript-eslint/consistent-type-assertions": [
"error",
{
assertionStyle: "as",
objectLiteralTypeAssertions: "allow",
},
],
"no-restricted-imports": ['error', {
'paths': [{
'name': 'json-bigint',
'message': 'Use ./src/utils/json-bigint instead'
}]
}]
},
overrides: [
{
env: {
node: true,
},
files: [".eslintrc.{js,cjs}"],
parserOptions: {
sourceType: "script",
},
},
],
rules: {
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'json-bigint',
message: 'Use ./src/utils/json-bigint instead'
}
]
}
]
}
};
9 changes: 0 additions & 9 deletions ethereum_history_api/oracles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,11 @@
},
"devDependencies": {
"@types/body-parser": "^1",
"@types/eslint": "^8",
"@types/express": "^4",
"@types/json-bigint": "^1",
"@types/lodash.isequal": "^4",
"@types/node": "^20.10.5",
"@typescript-eslint/eslint-plugin": "^6.18.0",
"@typescript-eslint/parser": "^6.18.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard-with-typescript": "^43.0.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
"eslint-plugin-prettier": "^5.1.2",
"eslint-plugin-promise": "^6.0.0",
"pino-pretty": "^10.3.1",
"prettier": "^3.1.1",
"rollup-plugin-copy": "^3.5.0",
Expand Down
41 changes: 1 addition & 40 deletions ethereum_history_api/tests/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,45 +1,6 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json'
},
env: {
browser: true,
es2021: true
},
extends: ['plugin:@typescript-eslint/recommended', 'prettier', 'plugin:prettier/recommended'],
rules: {
// Override specific rules
'@typescript-eslint/consistent-type-assertions': [
'error',
{
assertionStyle: 'as',
objectLiteralTypeAssertions: 'allow'
}
],
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'json-bigint',
message: 'Use ./src/utils/json-bigint instead'
}
]
}
]
},
overrides: [
{
env: {
node: true
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script'
}
}
]
}
};
9 changes: 0 additions & 9 deletions ethereum_history_api/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,11 @@
},
"devDependencies": {
"@types/body-parser": "^1",
"@types/eslint": "^8",
"@types/express": "^4",
"@types/json-bigint": "^1",
"@types/lodash.isequal": "^4",
"@types/node": "^20.10.5",
"@typescript-eslint/eslint-plugin": "^6.18.0",
"@typescript-eslint/parser": "^6.18.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard-with-typescript": "^43.0.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
"eslint-plugin-prettier": "^5.1.2",
"eslint-plugin-promise": "^6.0.0",
"pino-pretty": "^10.3.1",
"prettier": "^3.1.1",
"rollup-plugin-copy": "^3.5.0",
Expand Down
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@
},
"packageManager": "[email protected]",
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.18.0",
"@typescript-eslint/parser": "^6.18.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard-with-typescript": "^43.0.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
"eslint-plugin-prettier": "^5.1.2",
"eslint-plugin-promise": "^6.0.0",
"prettier": "^3.2.2",
"typescript": "^5.3.3"
}
Expand Down
40 changes: 10 additions & 30 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -757,17 +757,7 @@ __metadata:
languageName: node
linkType: hard

"@types/eslint@npm:^8":
version: 8.56.2
resolution: "@types/eslint@npm:8.56.2"
dependencies:
"@types/estree": "npm:*"
"@types/json-schema": "npm:*"
checksum: 10c0/e33ca87a30a9454ba9943e1270ac759996f5fe598a1c1afbaec1d1e7346a339e20bf2a9d81f177067116bbaa6cfa4f748993cb338f57978ae862ad38ffae56fe
languageName: node
linkType: hard

"@types/estree@npm:*, @types/estree@npm:1.0.5, @types/estree@npm:^1.0.0":
"@types/estree@npm:1.0.5, @types/estree@npm:^1.0.0":
version: 1.0.5
resolution: "@types/estree@npm:1.0.5"
checksum: 10c0/b3b0e334288ddb407c7b3357ca67dbee75ee22db242ca7c56fe27db4e1a31989cb8af48a84dd401deb787fe10cc6b2ab1ee82dc4783be87ededbe3d53c79c70d
Expand Down Expand Up @@ -831,7 +821,7 @@ __metadata:
languageName: node
linkType: hard

"@types/json-schema@npm:*, @types/json-schema@npm:^7.0.12":
"@types/json-schema@npm:^7.0.12":
version: 7.0.15
resolution: "@types/json-schema@npm:7.0.15"
checksum: 10c0/a996a745e6c5d60292f36731dd41341339d4eeed8180bb09226e5c8d23759067692b1d88e5d91d72ee83dfc00d3aca8e7bd43ea120516c17922cbcb7c3e252db
Expand Down Expand Up @@ -3873,22 +3863,13 @@ __metadata:
"@noir-lang/noir_js": "npm:0.23.0"
"@noir-lang/noirc_abi": "npm:^0.23.0"
"@types/body-parser": "npm:^1"
"@types/eslint": "npm:^8"
"@types/express": "npm:^4"
"@types/json-bigint": "npm:^1"
"@types/lodash.isequal": "npm:^4"
"@types/node": "npm:^20.10.5"
"@typescript-eslint/eslint-plugin": "npm:^6.18.0"
"@typescript-eslint/parser": "npm:^6.18.0"
body-parser: "npm:^1.20.2"
dotenv: "npm:^16.3.1"
eslint: "npm:^8.56.0"
eslint-config-prettier: "npm:^9.1.0"
eslint-config-standard-with-typescript: "npm:^43.0.0"
eslint-plugin-import: "npm:^2.25.2"
eslint-plugin-n: "npm:^15.0.0 || ^16.0.0 "
eslint-plugin-prettier: "npm:^5.1.2"
eslint-plugin-promise: "npm:^6.0.0"
fastify: "npm:^4.25.2"
json-bigint: "npm:^1.0.0"
json-rpc-2.0: "npm:^1.7.0"
Expand All @@ -3914,22 +3895,13 @@ __metadata:
"@noir-lang/noir_js": "npm:0.23.0"
"@noir-lang/noirc_abi": "npm:^0.23.0"
"@types/body-parser": "npm:^1"
"@types/eslint": "npm:^8"
"@types/express": "npm:^4"
"@types/json-bigint": "npm:^1"
"@types/lodash.isequal": "npm:^4"
"@types/node": "npm:^20.10.5"
"@typescript-eslint/eslint-plugin": "npm:^6.18.0"
"@typescript-eslint/parser": "npm:^6.18.0"
body-parser: "npm:^1.20.2"
dotenv: "npm:^16.3.1"
eslint: "npm:^8.56.0"
eslint-config-prettier: "npm:^9.1.0"
eslint-config-standard-with-typescript: "npm:^43.0.0"
eslint-plugin-import: "npm:^2.25.2"
eslint-plugin-n: "npm:^15.0.0 || ^16.0.0 "
eslint-plugin-prettier: "npm:^5.1.2"
eslint-plugin-promise: "npm:^6.0.0"
fastify: "npm:^4.25.2"
json-bigint: "npm:^1.0.0"
json-rpc-2.0: "npm:^1.7.0"
Expand All @@ -3949,7 +3921,15 @@ __metadata:
version: 0.0.0-use.local
resolution: "noir-ethereum-history-api@workspace:."
dependencies:
"@typescript-eslint/eslint-plugin": "npm:^6.18.0"
"@typescript-eslint/parser": "npm:^6.18.0"
eslint: "npm:^8.56.0"
eslint-config-prettier: "npm:^9.1.0"
eslint-config-standard-with-typescript: "npm:^43.0.0"
eslint-plugin-import: "npm:^2.25.2"
eslint-plugin-n: "npm:^15.0.0 || ^16.0.0 "
eslint-plugin-prettier: "npm:^5.1.2"
eslint-plugin-promise: "npm:^6.0.0"
prettier: "npm:^3.2.2"
typescript: "npm:^5.3.3"
languageName: unknown
Expand Down

0 comments on commit f2b1691

Please sign in to comment.