Skip to content

Commit 0650e11

Browse files
chore: combine markdown and JS linting, and include .mjs support
- Removed unused "lint:js" script and merged it into "lint" - Updated ESLint command to include .js, .jsx, and .mjs extensions
1 parent 5d3535f commit 0650e11

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"postinstall": "rm -rf node_modules/markdownlint-cli/node_modules/markdownlint",
88
"install:config": "cd packages/eslint-config-airbnb && npm prune && npm install",
99
"install:config:base": "cd packages/eslint-config-airbnb-base && npm prune && npm install",
10-
"lint": "markdownlint --config linters/.markdownlint.json README.md */README.md",
11-
"lint:js": "eslint -c linters/.eslintrc . --ext .js --ext .jsx",
10+
"lint": "markdownlint --config linters/.markdownlint.json README.md */README.md && eslint -c linters/.eslintrc . --ext .js --ext .jsx --ext .mjs",
1211
"pretest": "npm run --silent lint",
1312
"test": "npm run --silent test:config && npm run --silent test:config:base",
1413
"test:config": "cd packages/eslint-config-airbnb; npm test",

packages/eslint-config-airbnb-base/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ Our default export contains all of our ESLint rules, including ECMAScript 6+. It
6262

6363
2. Add `"extends": "airbnb-base"` to your .eslintrc.
6464

65-
⚠️ **Note**: ESLint only lints `.js` files by default.
65+
> **Note**: ESLint only lints `.js` files by default.
6666
6767
If your project uses `.jsx` (or `.tsx` with TypeScript), you need to pass extensions to the CLI:
6868

6969
```sh
70-
eslint . --ext .js,.jsx
70+
eslint . --ext .js, .jsx, .mjs
7171
```
7272

7373
Without this, JSX-related rules will not apply to `.jsx` files.

packages/eslint-config-airbnb/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ If you don't need React, see [eslint-config-airbnb-base](https://npmjs.com/eslin
5858

5959
2. Add `"extends": "airbnb"` to your `.eslintrc`
6060

61-
⚠️ **Note**: ESLint only lints `.js` files by default.
61+
> **Note**: ESLint only lints `.js` files by default.
6262
If your project uses `.jsx` (or `.tsx` with TypeScript), you need to pass extensions to the CLI:
6363

6464
```sh
65-
eslint . --ext .js,.jsx
65+
eslint . --ext .js, .jsx, .mjs
6666
```
6767

6868
Without this, JSX-related rules will not apply to `.jsx` files.

0 commit comments

Comments
 (0)