Skip to content

Commit 611e429

Browse files
prateekbisht23ljharb
authored andcommitted
[eslint-config] [*] [readme] add note about ESLint --ext
1 parent 74c56d7 commit 611e429

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
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",
1010
"lint": "markdownlint --config linters/.markdownlint.json README.md */README.md",
11-
"lint:js": "eslint -c linters/.eslintrc . --ext .js --ext .jsx",
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",
@@ -41,7 +40,6 @@
4140
},
4241
"homepage": "https://github.com/airbnb/javascript",
4342
"devDependencies": {
44-
"eslint": "^8.57.1",
4543
"markdownlint": "^0.29.0",
4644
"markdownlint-cli": "^0.35.0",
4745
"rimraf": "^6.0.1"

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

Lines changed: 4 additions & 4 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.
66-
67-
If your project uses `.jsx` (or `.tsx` with TypeScript), you need to pass extensions to the CLI:
65+
> **Note**: ESLint only lints `.js` files by default.
66+
67+
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: 3 additions & 3 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.
62-
If your project uses `.jsx` (or `.tsx` with TypeScript), you need to pass extensions to the CLI:
61+
> **Note**: ESLint only lints `.js` files by default.
62+
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)