Skip to content

Commit 4e00e6d

Browse files
committed
Add dummy legacy configs
1 parent abf3ba1 commit 4e00e6d

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = {
1313
},
1414
overrides: [
1515
{
16-
files: ["{bin,test}/**/*.js"],
16+
files: ["{bin,test,scripts}/**/*.js"],
1717
rules: {
1818
"no-undef": "error",
1919
"no-restricted-syntax": [

scripts/build.js

+22
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,25 @@ for (const { src, dest = src, transform } of FILES_TO_COPY) {
4141
fs.copyFileSync(path.join(DIR, src), path.join(BUILD, dest));
4242
}
4343
}
44+
45+
const LEGACY_CONFIGS = [
46+
"@typescript-eslint",
47+
"babel",
48+
"flowtype",
49+
"react",
50+
"standard",
51+
"unicorn",
52+
"vue",
53+
];
54+
55+
function legacyConfigStub(name) {
56+
return `
57+
throw new Error(
58+
'"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'
59+
);
60+
`.trim();
61+
}
62+
63+
for (const name of LEGACY_CONFIGS) {
64+
fs.writeFileSync(path.join(BUILD, `${name}.js`), legacyConfigStub(name));
65+
}

0 commit comments

Comments
 (0)