-
Notifications
You must be signed in to change notification settings - Fork 12
chore(NODE-7041): update dependencies and use standard Node team eslint configuration #86
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 all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7d3a9b2
chore(deps-dev): bump @types/node from 22.17.0 to 24.1.0
dependabot[bot] ecd7109
adopt lint with usual plugins
baileympearson ea2b0de
last upgrades
baileympearson ba8ae8d
fix TS compilation issues
baileympearson ae090f9
lint & test actions
baileympearson 2b81a7f
add permissions
baileympearson 74a3015
comments
baileympearson 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 was deleted.
Oops, something went wrong.
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,112 @@ | ||
{ | ||
"root": true, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:prettier/recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"env": { | ||
"node": true, | ||
"mocha": true, | ||
"es6": true | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2019 | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"prettier" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"rules": { | ||
"no-restricted-properties": [ | ||
"error", | ||
{ | ||
"object": "describe", | ||
"property": "only" | ||
}, | ||
{ | ||
"object": "it", | ||
"property": "only" | ||
}, | ||
{ | ||
"object": "context", | ||
"property": "only" | ||
} | ||
], | ||
"prettier/prettier": "error", | ||
"no-console": "error", | ||
"valid-typeof": "error", | ||
"eqeqeq": [ | ||
"error", | ||
"always", | ||
{ | ||
"null": "ignore" | ||
} | ||
], | ||
"strict": [ | ||
"error", | ||
"global" | ||
], | ||
"no-restricted-syntax": [ | ||
"error", | ||
{ | ||
"selector": "TSEnumDeclaration", | ||
"message": "Do not declare enums" | ||
}, | ||
{ | ||
"selector": "BinaryExpression[operator=/[=!]==/] Identifier[name='undefined']", | ||
"message": "Do not strictly check undefined" | ||
}, | ||
{ | ||
"selector": "BinaryExpression[operator=/[=!]==/] Literal[raw='null']", | ||
"message": "Do not strictly check null" | ||
}, | ||
{ | ||
"selector": "BinaryExpression[operator=/[=!]==?/] Literal[value='undefined']", | ||
"message": "Do not strictly check typeof undefined (NOTE: currently this rule only detects the usage of 'undefined' string literal so this could be a misfire)" | ||
} | ||
], | ||
"@typescript-eslint/no-require-imports": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
"argsIgnorePattern": "^_", | ||
"caughtErrorsIgnorePattern": "^_", | ||
"destructuredArrayIgnorePattern": "^_", | ||
"varsIgnorePattern": "^_" | ||
} | ||
] | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"lib/*.js" | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": 2019, | ||
"sourceType": "commonjs" | ||
} | ||
}, | ||
{ | ||
"files": [ | ||
"test/**/*ts" | ||
], | ||
"rules": { | ||
// chat `expect(..)` style chaining is considered | ||
// an unused expression | ||
"@typescript-eslint/no-unused-expressions": "off" | ||
} | ||
}, | ||
{ | ||
// json configuration files | ||
"files": [ | ||
".*.json" | ||
], | ||
"rules": { | ||
"@typescript-eslint/no-unused-expressions": "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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
on: [push, pull_request] | ||
|
||
name: CI | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js 22 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
- name: Install Dependencies | ||
run: npm install | ||
- name: Lint | ||
run: npm run lint | ||
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, | ||
"tabWidth": 2, | ||
"printWidth": 100, | ||
"arrowParens": "avoid", | ||
"trailingComma": "none" | ||
} |
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
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.