Skip to content

Commit

Permalink
Fix eslint NPM scripts and migrate to root .eslintrc config
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Hinek <[email protected]>
  • Loading branch information
frankhinek committed Jun 9, 2023
1 parent e2357b0 commit 7aac33b
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 268 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

5 changes: 5 additions & 0 deletions packages/web5-proxy-agent/.eslintrc.cjs → .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @type {import('eslint').ESLint.ConfigData} */
module.exports = {
root : true,
extends : ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
parser : '@typescript-eslint/parser',
parserOptions : {
Expand All @@ -12,6 +13,10 @@ module.exports = {
es2022 : true,
browser : true
},
'ignorePatterns': [
'dist',
'__tests__'
],
rules: {
'key-spacing': [
'error',
Expand Down
50 changes: 0 additions & 50 deletions packages/crypto/.eslintrc.cjs

This file was deleted.

4 changes: 2 additions & 2 deletions packages/crypto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"types": "./dist/types/main.d.ts",
"scripts": {
"build": "rimraf dist && node build/bundles.js && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json && tsc",
"lint": "eslint . --ext .js --max-warnings 0",
"lint:fix": "eslint . --ext .js --fix",
"lint": "eslint . --ext .ts --max-warnings 0",
"lint:fix": "eslint . --ext .ts --fix",
"test:node": "rimraf __tests__ && tsc -p tsconfig.test.json && c8 mocha",
"test:browser": "karma start karma.conf.cjs"
},
Expand Down
50 changes: 0 additions & 50 deletions packages/dids/.eslintrc.cjs

This file was deleted.

4 changes: 2 additions & 2 deletions packages/dids/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"types": "./dist/types/main.d.ts",
"scripts": {
"build": "rimraf dist && node build/bundles.js && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json && tsc",
"lint": "eslint . --ext .js --max-warnings 0",
"lint:fix": "eslint . --ext .js --fix",
"lint": "eslint . --ext .ts --max-warnings 0",
"lint:fix": "eslint . --ext .ts --fix",
"test:node": "rimraf __tests__ && tsc -p tsconfig.test.json && c8 mocha",
"test:browser": "karma start karma.conf.cjs"
},
Expand Down
50 changes: 0 additions & 50 deletions packages/web5-agent/.eslintrc.cjs

This file was deleted.

4 changes: 2 additions & 2 deletions packages/web5-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"types": "./dist/types/main.d.ts",
"scripts": {
"build": "rimraf dist && node build/bundles.js && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json && tsc",
"lint": "eslint . --ext .js --max-warnings 0",
"lint:fix": "eslint . --ext .js --fix",
"lint": "eslint . --ext .ts --max-warnings 0",
"lint:fix": "eslint . --ext .ts --fix",
"test:node": "rimraf __tests__ && tsc -p tsconfig.test.json && c8 mocha",
"test:browser": "karma start karma.conf.cjs"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/web5-proxy-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"types": "./dist/types/main.d.ts",
"scripts": {
"build": "rimraf dist && node build/bundles.js && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json && tsc",
"lint": "eslint . --ext .js --max-warnings 0",
"lint:fix": "eslint . --ext .js --fix",
"lint": "eslint . --ext .ts --max-warnings 0",
"lint:fix": "eslint . --ext .ts --fix",
"test:node": "rimraf __tests__ && tsc -p tsconfig.test.json && c8 mocha",
"test:browser": "karma start karma.conf.cjs"
},
Expand Down
50 changes: 0 additions & 50 deletions packages/web5-user-agent/.eslintrc.cjs

This file was deleted.

1 change: 0 additions & 1 deletion packages/web5-user-agent/.eslintrcignore

This file was deleted.

4 changes: 2 additions & 2 deletions packages/web5-user-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"types": "./dist/types/main.d.ts",
"scripts": {
"build": "rimraf dist && node build/bundles.js && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json && tsc",
"lint": "eslint . --ext .js --max-warnings 0",
"lint:fix": "eslint . --ext .js --fix",
"lint": "eslint . --ext .ts --max-warnings 0",
"lint:fix": "eslint . --ext .ts --fix",
"test:node": "rimraf __tests__ && tsc -p tsconfig.test.json && c8 mocha",
"test:browser": "karma start karma.conf.cjs"
},
Expand Down
50 changes: 0 additions & 50 deletions packages/web5/.eslintrc.cjs

This file was deleted.

4 changes: 2 additions & 2 deletions packages/web5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"types": "./dist/types/main.d.ts",
"scripts": {
"build": "rimraf dist && node build/bundles.js && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json && tsc",
"lint": "eslint . --ext .js --max-warnings 0",
"lint:fix": "eslint . --ext .js --fix",
"lint": "eslint . --ext .ts --max-warnings 0",
"lint:fix": "eslint . --ext .ts --fix",
"test:node": "rimraf __tests__ && tsc -p tsconfig.test.json && c8 mocha",
"test:browser": "karma start karma.conf.cjs"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/web5/src/did-resolution-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ export class DidResolutionCache implements DidResolverCache {
return this.cache.close();
}

}
}
8 changes: 7 additions & 1 deletion web5-js.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@
"path": "packages/web5-user-agent",
},
],
"settings": {},
"settings": {
"eslint.workingDirectories": [
{
"mode": "auto"
}
],
},
"launch": {
"version": "0.2.0",
"configurations": [
Expand Down

0 comments on commit 7aac33b

Please sign in to comment.