Skip to content

Commit

Permalink
Various review feedback for ESLint configuration (#204)
Browse files Browse the repository at this point in the history
Co-authored-by: Frederik Prijck <[email protected]>
  • Loading branch information
jonkoops and frederikprijck authored Aug 28, 2023
1 parent 584bac5 commit ba75e46
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 30 deletions.
29 changes: 16 additions & 13 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
{
"env": {
"node": true,
"commonjs": true,
"es2017": true,
"mocha": true
},
"ignorePatterns": ["**/*.mjs", "**/*.js"],
"ignorePatterns": ["build", "coverage"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:prettier/recommended"
],
"plugins": ["@typescript-eslint", "import"],
"overrides": [
{
"files": ["lib/**", "test/**"],
"rules": {
"import/no-default-export": "error"
}
}
],
"settings": {
"import/resolver": {
"typescript": true
}
},
"parserOptions": {
"ecmaVersion": 9,
"project": true
},
"rules": {
"import/no-default-export": "error",
"import/extensions": ["error", "always"]
}
}
5 changes: 2 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"printWidth": 100,
"singleQuote": false
}
"printWidth": 100
}
5 changes: 1 addition & 4 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ const jestConfig: JestConfigWithTsJest = {
testMatch: ["**/test/**/*.test.ts", "**/test/tests.ts"],
coverageProvider: "v8",
coveragePathIgnorePatterns: ["/node_modules/", "./test"],
reporters: [
"default",
["jest-junit", { outputDirectory: "test-results/jest" }],
],
reporters: ["default", ["jest-junit", { outputDirectory: "test-results/jest" }]],
coverageReporters: ["lcov", "text", "text-summary"],
};

Expand Down
108 changes: 100 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"prebuild": "rimraf build",
"build": "tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json && echo '{\"type\": \"commonjs\"}'> build/cjs/package.json",
"build:watch": "tsc -b --watch ./tsconfig.cjs.json ./tsconfig.esm.json && echo '{\"type\": \"commonjs\"}'> build/cjs/package.json",
"lint": "eslint ./lib ./test --ext ts",
"lint": "eslint .",
"lint:package": "publint",
"test": "npm run test:node && npm run test:browser",
"test:node": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest --coverage",
Expand All @@ -51,8 +51,9 @@
"@typescript-eslint/parser": "^6.4.1",
"browser-sync": "^2.29.3",
"concurrently": "^8.2.0",
"eslint": "^8.47.0",
"eslint": "^8.48.0",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-typescript": "^3.6.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-prettier": "^5.0.0",
"husky": "^8.0.3",
Expand Down

0 comments on commit ba75e46

Please sign in to comment.