Skip to content

Commit cc098ed

Browse files
committedJun 27, 2023
fix: added mjs to the postinstall script
Signed-off-by: prisis <d.bannert@anolilab.de>
1 parent 518bb22 commit cc098ed

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
 

‎packages/eslint-config/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ If you don’t have a `.eslintrc.js`, we will create the file for you after inst
6666

6767
If you already have a `.eslintrc.js`, then you can extend the `.eslintrc.js`, with `@anolilab/eslint-config`.
6868

69+
> Note: If the script detects an existing `.eslintrc.js` file, it will not overwrite it.
70+
71+
> Note: It can happen that the postinstall script don't run, then you have to add the `.eslintrc.js` manually.
72+
6973
> Note: Our default export contains all of our ESLint rules, including ECMAScript 6+. `@anolilab/eslint-config` use the `ecmaVersion`:`2021` as default.
7074
>
7175
> To change this configuration, change `env: { es2021: false, then active you needed env }` same for, `parserOptions: { "ecmaVersion": 2021 change the version }`

‎packages/eslint-config/src/postinstall.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const configFile = ".eslintrc";
2121
// eslint-disable-next-line sonarjs/cognitive-complexity
2222
const writeEslintRc = () => {
2323
// eslint-disable-next-line no-restricted-syntax
24-
for (const filename of [configFile, `${configFile}.js`, `${configFile}.cjs`, `${configFile}.json`, `${configFile}.yaml`, `${configFile}.yml`]) {
24+
for (const filename of [configFile, `${configFile}.js`, `${configFile}.cjs`, `${configFile}.mjs`, `${configFile}.json`, `${configFile}.yaml`, `${configFile}.yml`]) {
2525
if (existsSync(join(projectPath, filename))) {
2626
console.warn(`⚠️ ${filename} already exists;
2727
Make sure that it includes the following for @anolilab/eslint-config'

0 commit comments

Comments
 (0)
Please sign in to comment.