fixing lint

This commit is contained in:
Julien Catania 2023-09-22 20:42:28 +02:00
parent 476b57a800
commit 76a051e007
4 changed files with 44 additions and 60 deletions

View file

@ -11,6 +11,7 @@
"i18n-text/no-en": "off",
"eslint-comments/no-use": "off",
"import/no-namespace": "off",
"import/no-named-as-default": "off",
"no-shadow": "off",
"no-unused-vars": "off",
"prefer-template": "off",
@ -60,29 +61,7 @@
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
// Choose from one of the "project" configs below or omit to use <root>/tsconfig.json by default
// use <root>/path/to/folder/tsconfig.json
"project": "path/to/folder",
// Multiple tsconfigs (Useful for monorepos)
// use a glob pattern
"project": "packages/*/tsconfig.json",
// use an array
"project": [
"packages/module-a/tsconfig.json",
"packages/module-b/tsconfig.json"
],
// use an array of glob patterns
"project": [
"packages/*/tsconfig.json",
"other-packages/*/tsconfig.json"
]
"alwaysTryTypes": true // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
}
}
}

71
package-lock.json generated
View file

@ -37,11 +37,12 @@
"eslint-plugin-github": "^4.1.2",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.8.3",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^28.1.3",
"jest-circus": "^28.1.3",
"jest-junit": "^14.0.0",
"js-yaml": "^4.1.0",
"prettier": "^2.7.1",
"prettier": "^3.0.0",
"ts-jest": "^28.0.8",
"typescript": "^4.7.4"
}
@ -3703,35 +3704,6 @@
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/eslint-plugin-github/node_modules/eslint-plugin-prettier": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.0.tgz",
"integrity": "sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w==",
"dev": true,
"dependencies": {
"prettier-linter-helpers": "^1.0.0",
"synckit": "^0.8.5"
},
"engines": {
"node": "^14.18.0 || >=16.0.0"
},
"funding": {
"url": "https://opencollective.com/prettier"
},
"peerDependencies": {
"@types/eslint": ">=8.0.0",
"eslint": ">=8.0.0",
"prettier": ">=3.0.0"
},
"peerDependenciesMeta": {
"@types/eslint": {
"optional": true
},
"eslint-config-prettier": {
"optional": true
}
}
},
"node_modules/eslint-plugin-github/node_modules/prettier": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz",
@ -3889,6 +3861,35 @@
"node": ">=5.0.0"
}
},
"node_modules/eslint-plugin-prettier": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.0.tgz",
"integrity": "sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w==",
"dev": true,
"dependencies": {
"prettier-linter-helpers": "^1.0.0",
"synckit": "^0.8.5"
},
"engines": {
"node": "^14.18.0 || >=16.0.0"
},
"funding": {
"url": "https://opencollective.com/prettier"
},
"peerDependencies": {
"@types/eslint": ">=8.0.0",
"eslint": ">=8.0.0",
"prettier": ">=3.0.0"
},
"peerDependenciesMeta": {
"@types/eslint": {
"optional": true
},
"eslint-config-prettier": {
"optional": true
}
}
},
"node_modules/eslint-rule-documentation": {
"version": "1.0.23",
"resolved": "https://registry.npmjs.org/eslint-rule-documentation/-/eslint-rule-documentation-1.0.23.tgz",
@ -6463,15 +6464,15 @@
}
},
"node_modules/prettier": {
"version": "2.8.8",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.0.tgz",
"integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==",
"dev": true,
"bin": {
"prettier": "bin-prettier.js"
"prettier": "bin/prettier.cjs"
},
"engines": {
"node": ">=10.13.0"
"node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"

View file

@ -58,11 +58,12 @@
"eslint-plugin-github": "^4.1.2",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.8.3",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^28.1.3",
"jest-circus": "^28.1.3",
"jest-junit": "^14.0.0",
"js-yaml": "^4.1.0",
"prettier": "^2.7.1",
"prettier": "^3.0.0",
"ts-jest": "^28.0.8",
"typescript": "^4.7.4"
},

View file

@ -4,7 +4,10 @@ import {FileContent, InputProvider, ReportInput} from './input-provider'
import {listFiles} from '../utils/git'
export class LocalFileProvider implements InputProvider {
constructor(readonly name: string, readonly pattern: string[]) {}
constructor(
readonly name: string,
readonly pattern: string[]
) {}
async load(): Promise<ReportInput> {
const result: FileContent[] = []