Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Adding ESLint support back to React (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliperelman authored Jun 21, 2017
1 parent 7825767 commit f3a61ba
Show file tree
Hide file tree
Showing 3 changed files with 257 additions and 4,343 deletions.
7 changes: 7 additions & 0 deletions packages/neutrino-preset-react/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const web = require('neutrino-preset-web');
const compileLoader = require('neutrino-middleware-compile-loader');
const loaderMerge = require('neutrino-middleware-loader-merge');
const { join } = require('path');
const merge = require('deepmerge');

Expand Down Expand Up @@ -34,6 +35,12 @@ module.exports = (neutrino, opts = {}) => {

neutrino.use(web, options);

neutrino.config.when(neutrino.config.module.rules.has('lint'), () => {
neutrino.use(loaderMerge('lint', 'eslint'), {
plugins: ['react']
});
});

neutrino.config
.resolve
.modules.add(MODULES).end()
Expand Down
5 changes: 3 additions & 2 deletions packages/neutrino-preset-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-preset-react": "^6.24.0",
"deepmerge": "^1.3.2",
"eslint-plugin-react": "^7.1.0",
"react-hot-loader": "3.0.0-beta.7",
"neutrino-middleware-compile-loader": "^6.0.3",
"neutrino-middleware-loader-merge": "^6.0.3",
"neutrino-preset-web": "^6.0.2",
"react-hot-loader": "3.0.0-beta.7"
"neutrino-preset-web": "^6.0.2"
},
"peerDependencies": {
"neutrino": "^6.0.0"
Expand Down
Loading

0 comments on commit f3a61ba

Please sign in to comment.