Skip to content

Commit

Permalink
fix(parser): make babel-eslint a peer dep (#52)
Browse files Browse the repository at this point in the history
* fix(parser): make babel-eslint a peer dep

* docs(readme): specify that you need babel-eslint
  • Loading branch information
glebec authored Apr 3, 2018
1 parent 71d76e1 commit c4507aa
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 30 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Global installation is recommended for [Fullstack Education Group](http://www.fullstackacademy.com/) students. To install or upgrade the config along with its peer dependencies:

```sh
npm install -g eslint eslint-config-fullstack eslint-plugin-react
npm install -g eslint eslint-config-fullstack eslint-plugin-react babel-eslint
```

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

### Local

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:
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:

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

### Note on Parsing

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.
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.

## Extending

Expand Down
64 changes: 49 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 16 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "eslint-config-fullstack",
"version": "4.0.0",
"description":
"a complete starter ESLint config file to help students avoid errors and learn best practices",
"description": "a complete starter ESLint config file to help students avoid errors and learn best practices",
"main": "index.js",
"scripts": {
"lint": "eslint ./ --ignore-path .gitignore",
Expand All @@ -11,8 +10,15 @@
"test": "mocha"
},
"lint-staged": {
"*.{js}": ["prettier --write", "npm run lint-fix", "git add"],
"*.{json,md}": ["prettier --write", "git add"]
"*.{js}": [
"prettier --write",
"npm run lint-fix",
"git add"
],
"*.{json,md}": [
"prettier --write",
"git add"
]
},
"repository": {
"type": "git",
Expand All @@ -36,12 +42,11 @@
"author": "Gabriel Lebec <[email protected]> (https://github.com/glebec)",
"license": "MIT",
"bugs": {
"url":
"https://github.com/FullstackAcademy/eslint-config-fullstack/issues"
"url": "https://github.com/FullstackAcademy/eslint-config-fullstack/issues"
},
"homepage":
"https://github.com/FullstackAcademy/eslint-config-fullstack#readme",
"homepage": "https://github.com/FullstackAcademy/eslint-config-fullstack#readme",
"devDependencies": {
"babel-eslint": "^8.2.2",
"chai": "^4.1.2",
"eslint": "~4.19.1",
"eslint-plugin-react": "~7.7.0",
Expand All @@ -51,9 +56,8 @@
},
"peerDependencies": {
"eslint": "^4.19.1",
"eslint-plugin-react": "^7.7.0"
},
"dependencies": {
"eslint-plugin-react": "^7.7.0",
"babel-eslint": "^8.2.2"
}
},
"dependencies": {}
}

0 comments on commit c4507aa

Please sign in to comment.