Skip to content

Commit

Permalink
Add dummy legacy configs
Browse files Browse the repository at this point in the history
  • Loading branch information
lydell committed Feb 24, 2021
1 parent abf3ba1 commit 4e00e6d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
},
overrides: [
{
files: ["{bin,test}/**/*.js"],
files: ["{bin,test,scripts}/**/*.js"],
rules: {
"no-undef": "error",
"no-restricted-syntax": [
Expand Down
22 changes: 22 additions & 0 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,25 @@ for (const { src, dest = src, transform } of FILES_TO_COPY) {
fs.copyFileSync(path.join(DIR, src), path.join(BUILD, dest));
}
}

const LEGACY_CONFIGS = [
"@typescript-eslint",
"babel",
"flowtype",
"react",
"standard",
"unicorn",
"vue",
];

function legacyConfigStub(name) {
return `
throw new Error(
'"prettier/${name}" has been merged into "prettier" in eslint-config-prettier 8.0.0. See: https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21'
);
`.trim();
}

for (const name of LEGACY_CONFIGS) {
fs.writeFileSync(path.join(BUILD, `${name}.js`), legacyConfigStub(name));
}

0 comments on commit 4e00e6d

Please sign in to comment.