Skip to content

Commit

Permalink
feat: configs for jest and vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
xobotyi committed Nov 25, 2024
1 parent 5571ced commit 56860c2
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 2 deletions.
4 changes: 4 additions & 0 deletions configs/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import eslintPluginUnicorn from 'eslint-plugin-unicorn';

const baseConfig = [
js.configs.recommended,
{
// annoys af.
'capitalized-comments': 'off',
},

importPlugin.flatConfigs.recommended,
{
Expand Down
4 changes: 3 additions & 1 deletion configs/jest.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
const jestConfig = [];
import jest from 'eslint-plugin-jest';

const jestConfig = [jest.configs['flat/recommended']];
export default jestConfig;
4 changes: 3 additions & 1 deletion configs/vitest.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
const vitestConfig = [];
import vitest from '@vitest/eslint-plugin';

const vitestConfig = [vitest.configs.flat.recommended];
export default vitestConfig;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@eslint/markdown": "^6.2.1",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
"@vitest/eslint-plugin": "^1.1.10",
"eslint-config-prettier": "^9.1.0",
"eslint-config-xo": "^0.46.0",
"eslint-config-xo-react": "^0.27.0",
Expand Down
18 changes: 18 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,7 @@ __metadata:
"@react-hookz/eslint-formatter-gha": "npm:^2.0.1"
"@typescript-eslint/eslint-plugin": "npm:^8.15.0"
"@typescript-eslint/parser": "npm:^8.15.0"
"@vitest/eslint-plugin": "npm:^1.1.10"
eslint: "npm:^9.15.0"
eslint-config-prettier: "npm:^9.1.0"
eslint-config-xo: "npm:^0.46.0"
Expand Down Expand Up @@ -1452,6 +1453,23 @@ __metadata:
languageName: node
linkType: hard

"@vitest/eslint-plugin@npm:^1.1.10":
version: 1.1.10
resolution: "@vitest/eslint-plugin@npm:1.1.10"
peerDependencies:
"@typescript-eslint/utils": ">= 8.0"
eslint: ">= 8.57.0"
typescript: ">= 5.0.0"
vitest: "*"
peerDependenciesMeta:
typescript:
optional: true
vitest:
optional: true
checksum: 10c0/f69be2a1067976e452225ff8e2189dbfc9ebd6717be8013260372e8b724775d58849afd9e1a85449ba8f454ef0f69c8a200743b413fbe0e357b984c18e79bd5f
languageName: node
linkType: hard

"JSONStream@npm:^1.3.5":
version: 1.3.5
resolution: "JSONStream@npm:1.3.5"
Expand Down

0 comments on commit 56860c2

Please sign in to comment.