Skip to content

Commit

Permalink
eslint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrgrain committed May 7, 2024
1 parent 130f8c4 commit a5a6c76
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-node": "^0.3.9",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"jest": "^29.7.0",
"jest-circus": "^28.1.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/benchmarks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"watch": "yarn --silent tsc -w",
"bench": "node bin/benchmark.js",
"snapshot": "node scripts/snapshot-package.js",
"lint": "eslint . --ext .ts --ignore-path=.gitignore",
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .ts --ignore-path=.gitignore",
"lint:fix": "yarn lint --fix"
},
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/check-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"scripts": {
"build": "tsc --build && npm run lint",
"watch": "tsc --build -w",
"lint": "eslint . --ext .js,.ts --ignore-path=.gitignore",
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .js,.ts --ignore-path=.gitignore",
"lint:fix": "yarn lint --fix",
"test": "jest",
"test:update": "jest -u",
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/integ-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"scripts": {
"build": "tsc --build && npm run lint",
"lint": "eslint . --ext .ts --ignore-pattern '*.d.ts' --ignore-path=.gitignore",
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .ts --ignore-pattern '*.d.ts' --ignore-path=.gitignore",
"lint:fix": "yarn lint --fix",
"test:integ": "jest",
"package": "package-private"
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/kernel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"scripts": {
"build": "tsc --build && npm run lint",
"watch": "tsc --build -w",
"lint": "eslint . --ext .js,.ts --ignore-path=.gitignore",
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .js,.ts --ignore-path=.gitignore",
"lint:fix": "yarn lint --fix",
"test": "jest",
"test:update": "jest -u",
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"scripts": {
"build": "tsc --build && chmod +x bin/jsii-runtime && npx webpack-cli && npm run lint",
"watch": "tsc --build -w",
"lint": "eslint . --ext .js,.ts --ignore-path=.gitignore --ignore-pattern=webpack.config.js",
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .js,.ts --ignore-path=.gitignore --ignore-pattern=webpack.config.js",
"lint:fix": "yarn lint --fix",
"test": "jest",
"test:update": "jest -u",
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/spec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"scripts": {
"build": "tsc --build && bash build-tools/generate-json-schema.sh && npm run lint",
"watch": "tsc --build -w",
"lint": "eslint . --ext .js,.ts --ignore-path=.gitignore",
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .js,.ts --ignore-path=.gitignore",
"lint:fix": "yarn lint --fix",
"test": "jest",
"test:update": "jest -u",
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/spec/src/name-tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class NameTree {
if (!this._children[head]) {
this._children[head] = new NameTree();
}
this._children[head]!.register(fqn, rest);
this._children[head].register(fqn, rest);
}
return this;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/codemaker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"scripts": {
"build": "tsc --build && npm run lint",
"watch": "tsc --build -w",
"lint": "eslint . --ext .js,.ts --ignore-path=.gitignore",
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .js,.ts --ignore-path=.gitignore",
"lint:fix": "yarn lint --fix",
"test": "jest",
"test:update": "jest -u",
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii-calc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"scripts": {
"build": "jsii --project-references --silence-warnings reserved-word && npm run lint && jsii-rosetta --compile --verbose",
"watch": "jsii --project-references -w",
"lint": "eslint . --ext .js,.ts --ignore-path=.gitignore",
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .js,.ts --ignore-path=.gitignore",
"lint:fix": "yarn lint --fix",
"test": "(ls test/test.*.js | xargs -n1 node) && diff-test test/assembly.jsii .jsii",
"test:update": "npm run build && UPDATE_DIFF=1 npm run test",
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"scripts": {
"build": "tsc --build && npm run lint",
"watch": "tsc --build -w",
"lint": "eslint . --ext .js,.ts --ignore-path=.gitignore --ignore-pattern=test/negatives/*",
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .js,.ts --ignore-path=.gitignore --ignore-pattern=test/negatives/*",
"lint:fix": "yarn lint --fix",
"test": "jest",
"package": "package-js",
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii-diff/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"scripts": {
"build": "bash ./generate.sh && tsc --build && npm run lint",
"watch": "bash ./generate.sh && tsc --build -w",
"lint": "eslint . --ext .js,.ts --ignore-path=.gitignore",
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .js,.ts --ignore-path=.gitignore",
"lint:fix": "yarn lint --fix",
"test": "jest",
"test:update": "jest -u",
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii-pacmak/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"gen": "bash generate.sh",
"build": "npm run gen && tsc --build && chmod +x bin/jsii-pacmak && npm run lint",
"watch": "tsc --build -w",
"lint": "eslint . --ext .js,.ts --ignore-path=.gitignore",
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .js,.ts --ignore-path=.gitignore",
"lint:fix": "yarn lint --fix",
"test": "npm run test:unit && npm run test:build",
"test:unit": "jest",
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii-reflect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"scripts": {
"build": "tsc --build && chmod +x bin/jsii-tree && npm run lint",
"watch": "tsc --build -w",
"lint": "eslint . --ext .js,.ts --ignore-path=.gitignore",
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .js,.ts --ignore-path=.gitignore",
"lint:fix": "yarn lint --fix",
"test": "jest",
"test:update": "jest -u",
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii-rosetta/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"scripts": {
"build": "yarn tsc --build && npm run lint",
"watch": "yarn tsc --build -w",
"lint": "eslint . --ext .js,.ts --ignore-path=.gitignore --ignore-pattern=examples/* --ignore-pattern=test/translations/*",
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .js,.ts --ignore-path=.gitignore --ignore-pattern=examples/* --ignore-pattern=test/translations/*",
"lint:fix": "yarn lint --fix",
"test": "jest",
"test:update": "jest -u",
Expand Down
5 changes: 3 additions & 2 deletions packages/jsii/lib/assembler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -753,8 +753,9 @@ export class Assembler implements Emitter {
: fqn,
};
}
const symbolLocation = sym.getDeclarations()?.[0]?.getSourceFile()
?.fileName;
const symbolLocation = sym
.getDeclarations()?.[0]
?.getSourceFile()?.fileName;
const pkgInfo = symbolLocation
? this.findPackageInfo(symbolLocation)
: undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/jsii/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"gen": "cp ../../README.md . && bash ./generate.sh",
"build": "yarn gen && yarn tsc --build && npm run lint",
"watch": "bash ./generate.sh && tsc --build -w",
"lint": "eslint . --ext .js,.ts --ignore-path=.gitignore --ignore-pattern=test/negatives/*",
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .js,.ts --ignore-path=.gitignore --ignore-pattern=test/negatives/*",
"lint:fix": "yarn lint --fix",
"test": "jest",
"test:update": "jest -u",
Expand Down
2 changes: 1 addition & 1 deletion packages/oo-ascii-tree/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"scripts": {
"build": "tsc --build && npm run lint",
"watch": "tsc --build -w",
"lint": "eslint . --ext .js,.ts --ignore-path=.gitignore",
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .js,.ts --ignore-path=.gitignore",
"lint:fix": "yarn lint --fix",
"test": "jest",
"test:update": "jest -u",
Expand Down
2 changes: 1 addition & 1 deletion tools/jsii-compliance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"build": "echo 'build not needed for the jsii-compliance package'",
"report": "ts-node report.ts",
"lint": "eslint . --ext .js,.ts",
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .js,.ts",
"lint:fix": "yarn lint --fix"
},
"keywords": [],
Expand Down

0 comments on commit a5a6c76

Please sign in to comment.