- Notifications
You must be signed in to change notification settings - Fork13
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
7d3a9b2ecd7109ea2b0deba8ae8dae090f92b81a7f74a3015File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Uh oh!
There was an error while loading.Please reload this page.
| 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" | ||
| } | ||
| } | ||
| ] | ||
| } |
| 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 | ||
| ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "singleQuote": true, | ||
| "tabWidth": 2, | ||
| "printWidth": 100, | ||
| "arrowParens": "avoid", | ||
| "trailingComma": "none" | ||
| } |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.