-
Notifications
You must be signed in to change notification settings - Fork 760
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
Make linting less badder #3794
Make linting less badder #3794
Changes from all commits
c814834
1e4f6a2
449e6f2
d191420
e0e568c
6a066de
22aaa13
230d0d5
c106968
74067d0
d9322da
f42175f
9887082
8cadaa7
d49cb40
3f3ef49
5f04719
f434ac3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/usr/bin/env sh | ||
|
||
npm run lint:diff --workspaces | ||
npm run lint:diff |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", | ||
"vcs": { | ||
"enabled": true, | ||
"clientKind": "git", | ||
"useIgnoreFile": false | ||
}, | ||
"files": { | ||
"ignoreUnknown": true, | ||
"ignore": [ | ||
"**/node_modules/**", | ||
"**/dist/**", | ||
"**/coverage/**", | ||
"**/ethereum-tests/**", | ||
"**/config/**", | ||
"**/4844-interop/**", | ||
"**/scripts/**", | ||
"**/rlp/bin/**", | ||
"**/benchmarks/fixture/**" | ||
] | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"indentStyle": "space", | ||
"indentWidth": 2, | ||
"lineWidth": 100 | ||
}, | ||
"organizeImports": { | ||
"enabled": false | ||
}, | ||
"linter": { | ||
"enabled": false, | ||
"rules": { | ||
"recommended": true | ||
} | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"quoteStyle": "single", | ||
"semicolons": "asNeeded" | ||
} | ||
} | ||
} |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ module.exports = { | |
'github', | ||
'implicit-dependencies', | ||
'import', | ||
'prettier', | ||
'simple-import-sort', | ||
'ethereumjs', | ||
], | ||
|
@@ -20,22 +19,27 @@ module.exports = { | |
'coverage', | ||
'dist', | ||
'node_modules', | ||
'prettier.config.js', | ||
'recipes', | ||
'rlp.cjs', | ||
'scripts', | ||
'typedoc.js', | ||
'webpack.config.js', | ||
'vitest.config.ts', | ||
'vitest.config.browser.ts', | ||
'vitest.config.unit.ts' | ||
'vitest.config.unit.ts', | ||
'vite.*.ts', | ||
'ethereum-tests', | ||
'archive', | ||
'devnets', | ||
'eslint', | ||
'lint-staged.config.js', | ||
'tsconfig.lint.json', | ||
'package.json', | ||
], | ||
extends: [ | ||
'typestrict', | ||
'eslint:recommended', | ||
'plugin:import/recommended', | ||
'plugin:import/typescript', | ||
'prettier', | ||
], | ||
rules: { | ||
'no-restricted-imports': ['error', 'ethereum-cryptography/utils.js'], | ||
|
@@ -62,17 +66,18 @@ module.exports = { | |
'@typescript-eslint/restrict-plus-operands': 'off', | ||
'@typescript-eslint/return-await': 'error', | ||
'@typescript-eslint/strict-boolean-expressions': ['error'], | ||
'@typescript-eslint/no-use-before-define': 'warn', // TODO: decide if we care | ||
eqeqeq: 'error', | ||
'github/array-foreach': 'error', | ||
'implicit-dependencies/no-implicit': ['error', { peer: true, dev: true, optional: true }], | ||
'import/default': 'error', | ||
'import/default': 'off', | ||
'import/export': 'error', | ||
'import/exports-last': 'off', // TODO: set to `warn` for fixing and then `error` | ||
'import/extensions': ['error','ignorePackages'], | ||
'import/first': 'error', | ||
'import/group-exports': 'off', | ||
'import/named': 'error', | ||
'import/namespace': 'error', | ||
'import/named': 'off', | ||
'import/namespace': 'off', | ||
'import/no-absolute-path': 'error', | ||
'import/no-anonymous-default-export': 'error', | ||
'import/no-cycle': 'off', // TODO: set to `warn` for fixing and then `error` | ||
|
@@ -103,26 +108,53 @@ module.exports = { | |
'no-dupe-class-members': 'off', | ||
'no-extra-semi': 'off', | ||
'no-redeclare': 'off', | ||
'no-undef': 'off', | ||
'no-unused-vars': 'off', | ||
'no-var': 'error', | ||
'object-shorthand': 'error', | ||
'prefer-const': 'error', | ||
'prettier/prettier': 'error', | ||
'simple-import-sort/exports': 'error', | ||
'sort-imports': ['error', { ignoreDeclarationSort: true }], | ||
'ethereumjs/noBuffer': 'error', | ||
'no-restricted-syntax': 'off', | ||
}, | ||
parserOptions: { | ||
extraFileExtensions: ['.json'], | ||
sourceType: 'module', | ||
project: './tsconfig.lint.json', | ||
project: './config/tsconfig.lint.json', | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['test/**/*.ts', 'tests/**/*.ts', 'examples/**/*.ts'], | ||
files: ['**/test/**/*.ts', '**/bin/**.ts', ], | ||
rules: { | ||
'implicit-dependencies/no-implicit': 'off', | ||
'import/no-extraneous-dependencies': 'off', | ||
'no-console': 'off', | ||
'@typescript-eslint/no-floating-promises': 'warn', | ||
}, | ||
}, | ||
{ | ||
files: ['**/examples/**/*', '**/benchmarks/*.ts', ], | ||
rules: { | ||
'implicit-dependencies/no-implicit': 'off', | ||
'import/no-extraneous-dependencies': 'off', | ||
'no-console': 'off', | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
}, | ||
}, | ||
{ | ||
files: ['packages/statemanager/src/**', 'packages/vm/src/**', ], | ||
rules: { | ||
'@typescript-eslint/no-use-before-define': 'off', | ||
'no-invalid-this': 'off', | ||
'no-restricted-syntax': 'off', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do these specific packages have these exceptions? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I carried these over from the previous package-specific lint configs. We can go through them and see if they can be removed. |
||
}, | ||
}, | ||
{ | ||
files: ['packages/wallet/**'], | ||
rules: { | ||
'github/array-foreach': 'warn', | ||
'no-prototype-builtins': 'warn', | ||
}, | ||
}, | ||
], | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
{ | ||
"name": "eslint-plugin-ethereumjs", | ||
"version": "0.1.0", | ||
"files": [ | ||
"index.js", | ||
"noBuffer.js" | ||
], | ||
"files": ["index.js", "noBuffer.js"], | ||
"main": "index.js" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
'*.{js,json,md,ts}': 'prettier --ignore-unknown --write', | ||
'*.{js,json,md,ts}': 'npx @biomejs/biome check --write', | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now ignore
tsx
here, is this intended? Also forjsx
belowThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we don't use
tsx
andjsx
in our code base. Unless we start writing front-end web apps, we never will, so no point in checking for them.