-
Notifications
You must be signed in to change notification settings - Fork 187
Add linter (and formatter through eslint), config and ci action step #452
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
Merged
Merged
Changes from 11 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
27ebf04
Before running with prettier
CoveMB 7c7828e
After running with prettier
CoveMB ce5fcd3
Add consistent-type-imports rule
CoveMB 3cd0b59
Add lint step in ci action
CoveMB 31f0c78
resolve prettier conflict
CoveMB 365421b
After running with prettier
CoveMB cedaeaa
resolve prettier conflict
CoveMB 98bd8af
Add lint step in ci action
CoveMB a9098d0
resolve prettier conflict
CoveMB 6e9df26
resolve prettier conflict
CoveMB 574a739
Remove .vscode directory from Git tracking
CoveMB c0e9002
move linter action in it's own job
CoveMB 86c65dc
add lint note in readme
CoveMB a1111d3
Update .github/workflows/test.yml
CoveMB abbd5a4
Merge remote-tracking branch 'upstream/master'
CoveMB beffa34
Merge branch 'master' into master
ericglau d6bec2a
lint script files
CoveMB 315b775
Merge branch 'master' of github.com:CoveMB/contracts-wizard
CoveMB File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,3 +5,4 @@ node_modules | |
|
|
||
| .env | ||
| .env.local | ||
| .vscode/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "singleQuote": true, | ||
| "arrowParens": "avoid", | ||
| "trailingComma": "all", | ||
| "printWidth": 120, | ||
| "bracketSpacing": true | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| // @ts-check | ||
|
|
||
| import eslint from '@eslint/js'; | ||
| import prettierPluginRecommended from 'eslint-plugin-prettier/recommended'; | ||
| import unicornPlugin from 'eslint-plugin-unicorn'; | ||
| import typescriptEslint from 'typescript-eslint'; | ||
|
|
||
| export default typescriptEslint.config( | ||
| eslint.configs.recommended, | ||
| typescriptEslint.configs.strict, | ||
| prettierPluginRecommended, | ||
| { | ||
| plugins: { | ||
| unicorn: unicornPlugin, | ||
| }, | ||
| rules: { | ||
| '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], | ||
| '@typescript-eslint/no-non-null-assertion': 'warn', | ||
| '@typescript-eslint/consistent-type-imports': 'error', | ||
ericglau marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 'prettier/prettier': [ | ||
| 'error', | ||
| { singleQuote: true, arrowParens: 'avoid', trailingComma: 'all', printWidth: 120, bracketSpacing: true }, | ||
| ], | ||
| }, | ||
| }, | ||
| { | ||
| ignores: ['node_modules/', '*.sol', 'packages/*/node_modules/', 'packages/**/dist/', 'packages/**/build/'], | ||
| }, | ||
| { | ||
| files: ['**/*.config.js'], | ||
| languageOptions: { | ||
| sourceType: 'commonjs', | ||
| }, | ||
| }, | ||
| { | ||
| files: ['**/*.mjs', '**/*.js'], | ||
| languageOptions: { | ||
| sourceType: 'commonjs', | ||
| globals: { | ||
| process: 'readonly', | ||
| global: 'readonly', | ||
| console: 'readonly', | ||
| }, | ||
| }, | ||
| rules: { | ||
| '@typescript-eslint/no-require-imports': 'off', | ||
| }, | ||
| }, | ||
| ); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,4 +31,4 @@ | |
| "typescript": "^5.0.0", | ||
| "semver": "^7.6.0" | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.