Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
Extend ESLint to test files. (#1107)
Browse files Browse the repository at this point in the history
  • Loading branch information
erossignon committed Mar 31, 2021
1 parent bbb20b2 commit d3b9585
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .eslintignore
@@ -1,2 +1,2 @@
/lib-es5
/test
lib-es5
node_modules
46 changes: 39 additions & 7 deletions .eslintrc
Expand Up @@ -5,7 +5,8 @@
],
"parser": "@babel/eslint-parser",
"parserOptions": {
"sourceType": "module"
"sourceType": "module",
"requireConfigFile": false
},
"rules": {
"wrap-iife": "off",
Expand All @@ -20,10 +21,41 @@
"import/prefer-default-export": "off",
"camelcase": "off"
},
"overrides": [{
"files": ["prelude/**/*"],
"rules": {
"strict": "off"
"overrides": [
{
"files": ["prelude/**/*"],
"rules": {
"strict": "off"
},
}
, {
"files": ["test/**/*"],
"rules": {
"array-callback-return": "off",
"func-names": "off",
"global-require": "off",
"guard-for-in": "off",
"import/extensions": "off",
"import/no-dynamic-require": "off",
"import/no-extraneous-dependencies": "off",
"import/newline-after-import": "off",
"import/no-unresolved": "off",
"import/no-useless-path-segments": "off",
"import/order": "off",
"no-console": "off",
"no-lonely-if": "off",
"no-multi-assign": "off",
"no-undef": "off",
"no-else-return": "off",
"no-use-before-define": "off",
"object-shorthand": "off",
"one-var": "off",
"prefer-arrow-callback": "off",
"prefer-destructuring": "off",
"prefer-object-spread": "off",
"prefer-template": "off",
"strict": ["error", "global"]
}
}
}]
}
]
}
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -77,9 +77,9 @@
}
},
"scripts": {
"lint": "eslint lib prelude || true",
"lint:fix": "eslint lib prelude test || true",
"babel": "node test/rimraf-es5.js && babel lib --out-dir lib-es5",
"lint": "eslint lib prelude test || true",
"lint:fix": "eslint lib prelude test --fix",
"prepare": "npm run babel",
"prepublishOnly": "npm run lint",
"test": "npm run babel && node test/test.js node14 no-npm && node test/test.js node12 no-npm && node test/test.js node10 no-npm && node test/test.js host only-npm"
Expand Down

0 comments on commit d3b9585

Please sign in to comment.