This repository was archived by the owner on Jul 27, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +79
-0
lines changed
Expand file tree Collapse file tree 6 files changed +79
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "root": true,
3+ "parser": "babel-eslint",
4+ "env": {
5+ "browser": true,
6+ "commonjs": true,
7+ "es6": true,
8+ "jest": true,
9+ "node": true
10+ },
11+ "parserOptions": {
12+ "ecmaVersion": 6,
13+ "sourceType": "module"
14+ },
15+ "rules": {
16+ // http://eslint.org/docs/rules/
17+ "no-unused-expressions": "warn",
18+ "no-unused-labels": "warn",
19+ "no-unused-vars": ["warn", { "vars": "local", "args": "none" }]
20+ }
21+ }
Original file line number Diff line number Diff line change 1+ dist /
Original file line number Diff line number Diff line change 1+ /* eslint-disable */
2+ const unsed = 'I am unused' ;
3+
4+ export default class MyComponent extends React . Component {
5+
6+ render ( ) {
7+ return < div > Hello</ div >
8+ }
9+ }
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " _sandbox" ,
3+ "version" : " 1.0.0" ,
4+ "main" : " index.js" ,
5+ "repository" : {},
6+ "license" : " MIT" ,
7+ "scripts" : {
8+ "start" : " node watch.js"
9+ }
10+ }
Original file line number Diff line number Diff line change 1+ const webpack = require ( "webpack" ) ;
2+ const config = require ( "./webpack.config" ) ;
3+
4+ const compiler = webpack ( config ) ;
5+
6+ compiler . watch ( { } , ( stats ) => {
7+
8+ } ) ;
Original file line number Diff line number Diff line change 1+ const FriendlyErrorsWebpackPlugin = require ( '../index' ) ;
2+
3+ module . exports = {
4+ entry : __dirname + "/index.js" ,
5+ output : {
6+ path : __dirname + "/dist" ,
7+ filename : "bundle.js"
8+ } ,
9+ plugins : [
10+ new FriendlyErrorsWebpackPlugin ( )
11+ ] ,
12+ module : {
13+ loaders : [
14+ {
15+ test : / \. j s $ / ,
16+ loader : 'eslint-loader' ,
17+ enforce : 'pre' ,
18+ include : __dirname
19+ } ,
20+ {
21+ test : / \. j s x ? $ / ,
22+ loader : 'babel-loader' ,
23+ query : {
24+ presets : [ 'react' ] ,
25+ } ,
26+ exclude : / n o d e _ m o d u l e s /
27+ }
28+ ]
29+ }
30+ } ;
You can’t perform that action at this time.
0 commit comments