Skip to content

Commit

Permalink
No need to re-declare all the rules in the server override
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Aug 1, 2022
1 parent 933d96a commit c8b777a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
21 changes: 11 additions & 10 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// These are rules that apply this to repo, they're not exported. Ignore.

const localConfig = require("./server.js");

localConfig.rules = {
...localConfig.rules,
"filenames/match-exported": "off",
module.exports = {
extends: ["./index.js", "./server.js"],
rules: {
"filenames/match-exported": "off",
},
settings: {
react: {
version: "16.13", // Irrelevant for this repo
},
jest: { version: "26" }, // Irrelevant for this repo
},
};
localConfig.settings.react.version = "16.13"; // Irrelevant for this repo
localConfig.settings.jest = { version: "26" }; // Irrelevant for this repo

module.exports = localConfig;
6 changes: 3 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = require("./index.js");
module.exports.extends = [
"plugin:jest/recommended"
];

module.exports.extends.push("plugin:jest/recommended");
module.exports.rules = {
...module.exports.rules,
// Allow CJS because not all tooling is ready
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-var-requires": "off",
Expand Down

0 comments on commit c8b777a

Please sign in to comment.