Skip to content

Commit

Permalink
fix: Jest lint only test files
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieubosquet committed Mar 8, 2021
1 parent b435b6a commit f96cf5d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solid/eslint-config-base",
"version": "0.1.8",
"version": "0.2.0",
"description": "Solid defaults for eslinting.",
"license": "MIT",
"keywords": [
Expand Down
15 changes: 12 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ module.exports = {
* - ESLint recommended https://eslint.org/docs/rules/
* - Airbnb base https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb-base
* - ES6+ export/imports https://github.com/benmosher/eslint-plugin-import/tree/master/config
* - Jest https://github.com/jest-community/eslint-plugin-jest#rules
* - Prettier https://github.com/prettier/eslint-plugin-prettier#recommended-configuration
*/
extends: [
Expand All @@ -26,8 +25,6 @@ module.exports = {
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:jest/recommended",
"plugin:jest/style",
"plugin:prettier/recommended",
],

Expand Down Expand Up @@ -320,5 +317,17 @@ module.exports = {
"@typescript-eslint/no-unused-vars": "error",
},
},
{
files: [ "*.test.ts", "*.test.js" ],

/**
* Extends (overrides in order of extension):
* - Jest https://github.com/jest-community/eslint-plugin-jest#rules
*/
extends: [
"plugin:jest/recommended",
"plugin:jest/style",
],
},
],
};

0 comments on commit f96cf5d

Please sign in to comment.