generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated all packages to use ESLint v9 (#579)
* Updated all packages to use ESLint v9
- Loading branch information
1 parent
59a7e60
commit b36e7b1
Showing
30 changed files
with
600 additions
and
489 deletions.
There are no files selected for viewing
This file contains 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,5 @@ | ||
--- | ||
"@web5/api": patch | ||
--- | ||
|
||
Updated some dependencies of `api` package |
This file contains 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,13 @@ | ||
--- | ||
"@web5/common": patch | ||
"@web5/crypto": patch | ||
"@web5/crypto-aws-kms": patch | ||
"@web5/dids": patch | ||
"@web5/credentials": patch | ||
"@web5/agent": patch | ||
"@web5/user-agent": patch | ||
"@web5/proxy-agent": patch | ||
"@web5/identity-agent": patch | ||
--- | ||
|
||
Updated dependencies of all packages |
This file was deleted.
Oops, something went wrong.
This file contains 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,92 @@ | ||
const eslint = require('@eslint/js'); | ||
const globals = require('globals'); | ||
const tsParser = require('@typescript-eslint/parser'); | ||
const tsPlugin = require('@typescript-eslint/eslint-plugin'); | ||
const mochaPlugin = require('eslint-plugin-mocha'); | ||
|
||
/** @type {import('eslint').ESLint.ConfigData} */ | ||
module.exports = [ | ||
eslint.configs.recommended, | ||
mochaPlugin.configs.flat.recommended, | ||
// tsPlugin.configs.flat.recommended, // @typescript-eslint v7.9.0 doesn't have a recommended config yet, v8 alpha build has it, so should be available soon. | ||
{ | ||
// extends : ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], | ||
languageOptions: { | ||
parser: tsParser, | ||
parserOptions: { | ||
ecmaFeatures: { modules: true }, | ||
ecmaVersion: '2022', | ||
project: [ | ||
'tests/tsconfig.json'// this is the config that includes both `src` and `tests` directories | ||
] | ||
}, | ||
globals: { | ||
...globals.node, | ||
...globals.es2021, | ||
...globals.browser | ||
} | ||
}, | ||
plugins: { | ||
'@typescript-eslint': tsPlugin, | ||
'mocha': mochaPlugin | ||
}, | ||
files: [ | ||
'**/*.ts' | ||
], | ||
// IMPORTANT and confusing: `ignores` only exclude files from the `files` setting. | ||
// To exclude *.js files entirely, you need to have a separate config object altogether. (See another `ignores` below.) | ||
ignores: [ | ||
'**/*.d.ts', | ||
], | ||
rules: { | ||
'key-spacing': [ | ||
'error', | ||
{ | ||
'align': { | ||
'afterColon' : true, | ||
'beforeColon' : true, | ||
'on' : 'colon' | ||
} | ||
} | ||
], | ||
'quotes': [ | ||
'error', | ||
'single', | ||
{ 'allowTemplateLiterals': true } | ||
], | ||
'semi' : ['error', 'always'], | ||
'indent' : ['error', 2, { 'SwitchCase': 1 }], | ||
'no-unused-vars' : 'off', | ||
'prefer-const' : 'off', | ||
'@typescript-eslint/no-unused-vars' : [ | ||
'error', | ||
{ | ||
'vars' : 'all', | ||
'args' : 'after-used', | ||
'ignoreRestSiblings' : true, | ||
'argsIgnorePattern' : '^_', | ||
'varsIgnorePattern' : '^_' | ||
} | ||
], | ||
'no-dupe-class-members' : 'off', | ||
'no-trailing-spaces' : ['error'], | ||
'@typescript-eslint/no-explicit-any' : 'off', | ||
'@typescript-eslint/no-non-null-assertion' : 'off', | ||
'@typescript-eslint/ban-ts-comment' : 'off', | ||
// TODO: Revisit new default mocha rules that were disabled in #579 - https://github.com/TBD54566975/web5-js/issues/580 | ||
'mocha/no-exclusive-tests' : 'warn', | ||
'mocha/no-setup-in-describe' : 'off', | ||
'mocha/no-mocha-arrows' : 'off', | ||
'mocha/max-top-level-suites' : 'off', | ||
'mocha/no-identical-title' : 'off', | ||
'mocha/no-pending-tests' : 'off', | ||
'mocha/no-skipped-tests' : 'off', | ||
'mocha/no-sibling-hooks' : 'off', | ||
} | ||
}, { | ||
ignores: [ | ||
'**/*.js', | ||
'**/*.cjs', | ||
'**/*.mjs', | ||
], | ||
}]; |
This file contains 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 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 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 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 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 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 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 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 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 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 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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import * as Chai from 'chai'; | ||
|
||
/** | ||
* Chai plugin for validating URLs. | ||
* | ||
|
This file contains 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 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.