Skip to content

Commit c4507aa

Browse files
authored
fix(parser): make babel-eslint a peer dep (#52)
* fix(parser): make babel-eslint a peer dep * docs(readme): specify that you need babel-eslint
1 parent 71d76e1 commit c4507aa

File tree

3 files changed

+68
-30
lines changed

3 files changed

+68
-30
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
Global installation is recommended for [Fullstack Education Group](http://www.fullstackacademy.com/) students. To install or upgrade the config along with its peer dependencies:
1717

1818
```sh
19-
npm install -g eslint eslint-config-fullstack eslint-plugin-react
19+
npm install -g eslint eslint-config-fullstack eslint-plugin-react babel-eslint
2020
```
2121

2222
In your global `~/.eslintrc.json` file:
@@ -31,7 +31,7 @@ Note that the `eslint-config-` portion of the module name is assumed by ESLint.
3131

3232
### Local
3333

34-
A specific project can extend this definition by including `eslint eslint-config-fullstack eslint-plugin-react` as saved dev-dependencies, and defining a local `.eslintrc.json`. Project-level eslintrc files are recommended to be set as `root`, which prevents users' global configs from producing inconsistent results:
34+
A specific project can extend this definition by including `eslint eslint-config-fullstack eslint-plugin-react babel-eslint` as saved dev-dependencies, and defining a local `.eslintrc.json`. Project-level eslintrc files are recommended to be set as `root`, which prevents users' global configs from producing inconsistent results:
3535

3636
```json
3737
{
@@ -42,7 +42,7 @@ A specific project can extend this definition by including `eslint eslint-config
4242

4343
### Note on Parsing
4444

45-
This config now uses `babel-eslint` as the parser by default. This enables linting some relatively modern code which ESLint's default parser does not handle, and was necessary for this project to lint itself. You do not need to install `babel-eslint` manually as it is a dependency of this config.
45+
This config now uses `babel-eslint` as the parser by default. This enables linting some relatively modern code which ESLint's default parser does not handle, and was necessary for this project to lint itself. You still need to install `babel-eslint` manually as it is a peer dependency of this config.
4646

4747
## Extending
4848

package-lock.json

Lines changed: 49 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"name": "eslint-config-fullstack",
33
"version": "4.0.0",
4-
"description":
5-
"a complete starter ESLint config file to help students avoid errors and learn best practices",
4+
"description": "a complete starter ESLint config file to help students avoid errors and learn best practices",
65
"main": "index.js",
76
"scripts": {
87
"lint": "eslint ./ --ignore-path .gitignore",
@@ -11,8 +10,15 @@
1110
"test": "mocha"
1211
},
1312
"lint-staged": {
14-
"*.{js}": ["prettier --write", "npm run lint-fix", "git add"],
15-
"*.{json,md}": ["prettier --write", "git add"]
13+
"*.{js}": [
14+
"prettier --write",
15+
"npm run lint-fix",
16+
"git add"
17+
],
18+
"*.{json,md}": [
19+
"prettier --write",
20+
"git add"
21+
]
1622
},
1723
"repository": {
1824
"type": "git",
@@ -36,12 +42,11 @@
3642
"author": "Gabriel Lebec <[email protected]> (https://github.com/glebec)",
3743
"license": "MIT",
3844
"bugs": {
39-
"url":
40-
"https://github.com/FullstackAcademy/eslint-config-fullstack/issues"
45+
"url": "https://github.com/FullstackAcademy/eslint-config-fullstack/issues"
4146
},
42-
"homepage":
43-
"https://github.com/FullstackAcademy/eslint-config-fullstack#readme",
47+
"homepage": "https://github.com/FullstackAcademy/eslint-config-fullstack#readme",
4448
"devDependencies": {
49+
"babel-eslint": "^8.2.2",
4550
"chai": "^4.1.2",
4651
"eslint": "~4.19.1",
4752
"eslint-plugin-react": "~7.7.0",
@@ -51,9 +56,8 @@
5156
},
5257
"peerDependencies": {
5358
"eslint": "^4.19.1",
54-
"eslint-plugin-react": "^7.7.0"
55-
},
56-
"dependencies": {
59+
"eslint-plugin-react": "^7.7.0",
5760
"babel-eslint": "^8.2.2"
58-
}
61+
},
62+
"dependencies": {}
5963
}

0 commit comments

Comments
 (0)