Skip to content

Commit

Permalink
feat: add es9 base configuration
Browse files Browse the repository at this point in the history
Also made some tweaks to the tests.
  • Loading branch information
satazor committed Apr 22, 2018
1 parent 9dcfadc commit 9c8fca8
Show file tree
Hide file tree
Showing 19 changed files with 156 additions and 107 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,17 @@ Create a `.eslintrc.json` file in the project root using a base configuration an
First you need to choose the **base** configuration to use:

- `es5` - The configuration to be used in ECMAScript 5 based projects
- `es6` - The configuration to be used in ECMAScript 6 based projects
- `es7` - The configuration to be used in ECMAScript 7 based projects
- `es8` - The configuration to be used in ECMAScript 8 based projects
- `es6` - The configuration to be used in ECMAScript 6 based projects (aka 2015)
- `es7` - The configuration to be used in ECMAScript 7 based projects (aka 2016)
- `es8` - The configuration to be used in ECMAScript 8 based projects (aka 2017)
- `es9` - The configuration to be used in ECMAScript 8 based projects (aka 2018)

Then enhance it with one or more **addons**:

- `browser` - If you are going to develop code for the browser (assumes you use CommonJS or AMD)
- `node` - If you are going to develop code for [NodeJS](nodejs.org)
- `es6-modules`: If you are going to use ES6 import & export instead of CommonJS or AMD
- `object-spread`: Allows to use [object rest spread](https://github.com/tc39/proposal-object-rest-spread) when destructuring objects
- `object-spread`: Allows to use [object rest spread](https://github.com/tc39/proposal-object-rest-spread) when destructuring objects (not necessary if you are using the `es9` base configuration)
- `babel-parser`: Use [babel-eslint](https://github.com/babel/babel-eslint) parser so that you may use language features that are not yet implemented in eslint (e.g.: dynamic imports)
- `react` - If you are going to use [React](https://reactjs.org/) (requires `es6` base configuration or higher)
- `jest` - If you are going to [Jest](https://facebook.github.io/jest/) to develop tests
Expand All @@ -59,8 +60,7 @@ Cutting edge react in the browser:
"eslint-config-moxy/es8",
"eslint-config-moxy/addons/browser",
"eslint-config-moxy/addons/es6-modules",
"eslint-config-moxy/addons/react",
"eslint-config-moxy/addons/object-spread"
"eslint-config-moxy/addons/react"
]
}
```
Expand Down
11 changes: 11 additions & 0 deletions es9.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use strict';

module.exports = {
'extends': [
'./es8',
].map(require.resolve),
'parserOptions': {
'ecmaVersion': 2018,
'sourceType': 'script',
},
};
82 changes: 53 additions & 29 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
]
},
"peerDependencies": {
"eslint": "^4.0.0"
"eslint": "^4.18.0"
},
"dependencies": {
"babel-eslint": "^8.1.0",
Expand All @@ -62,7 +62,7 @@
"@commitlint/cli": "^6.0.1",
"@commitlint/config-conventional": "^6.0.2",
"create-react-class": "^15.6.0",
"eslint": "^4.0.0",
"eslint": "^4.19.1",
"husky": "^0.14.0",
"jest": "^22.0.0",
"lint-staged": "^7.0.0",
Expand Down
Loading

0 comments on commit 9c8fca8

Please sign in to comment.