Skip to content

Commit

Permalink
chore(*): upgrade eslint
Browse files Browse the repository at this point in the history
* upgrade to latest eslint - v1 -> v4
* upgrade to latest babel-eslint - v5  -> v7
* upgrade to latest eslint-config-airbnb-base (switched from eslint-config-airbnb which was
* deprecated) - https://www.npmjs.com/package/eslint-config-airbnb-base
  • Loading branch information
topheman committed Jun 17, 2017
1 parent 848884d commit fa8d5d3
Show file tree
Hide file tree
Showing 4 changed files with 418 additions and 477 deletions.
6 changes: 4 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"no-console": 0,
"padded-blocks": 0,
"indent": [2, 2, {"SwitchCase": 1}],
"spaced-comment": 1
"spaced-comment": 1,
"quotes": ["error", "single", { "allowTemplateLiterals": true }],
"import/prefer-default-export": "off"
},
"extends": "airbnb/base"
"extends": "airbnb-base"
}
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"start": "npm run webpack",
"test": "npm run lint",
"lint": "./node_modules/.bin/eslint src",
"lint-fix": "./node_modules/.bin/eslint --fix src --ext .js",
"clean-dist": "node ./bin/clean-dist.js",
"serve-build": "echo 'Serving distribution folder build/dist' && npm run serve-dist",
"serve-dist": "./node_modules/.bin/serve build/dist",
Expand Down Expand Up @@ -44,16 +45,17 @@
"license": "MIT",
"devDependencies": {
"babel-core": "^6.5.2",
"babel-eslint": "^5.0.0",
"babel-eslint": "^7.2.3",
"babel-loader": "^6.2.3",
"babel-preset-es2015": "^6.5.0",
"chai": "^4.0.2",
"css-loader": "^0.23.1",
"del": "^2.2.0",
"eslint": "^1.10.3",
"eslint-config-airbnb": "^5.0.1",
"eslint": "4",
"eslint-config-airbnb-base": "^11.2.0",
"eslint-loader": "^1.3.0",
"eslint-plugin-react": "^3.16.1",
"eslint-plugin-import": "^2.3.0",
"eslint-plugin-react": "7",
"extract-text-webpack-plugin": "2",
"file-loader": "^0.8.5",
"git-rev-sync": "^1.4.0",
Expand All @@ -72,6 +74,5 @@
"webpack": "^2.6.1",
"webpack-dev-server": "^2.4.5"
},
"private": true,
"dependencies": {}
"private": true
}
11 changes: 5 additions & 6 deletions src/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ if (process.env.NODE_ENV !== 'production') {
console.info('Linter active, if you meet some problems, you can still run without linter, just set the env var LINTER=false.');
}
}
else {
if (process.env.DEVTOOLS) {
console.info('Turn on the "Sources" tab of your devtools to inspect original source code - thanks to sourcemaps!');
}
else if (process.env.DEVTOOLS) {
console.info('Turn on the "Sources" tab of your devtools to inspect original source code - thanks to sourcemaps!');
}

/**
Expand All @@ -35,11 +33,12 @@ if (process.env.DEVTOOLS && process.env.NODE_ENV !== 'production') {

const main = () => {
console.log('Welcome! More infos at https://github.com/topheman/webpack-babel-starter');
const { document } = global;
// the following is nothing extraordinary ... just to show that the requiring of images work (as well from sass and require / direct and inlined)
if (global.document && global.document.querySelector) {
if (document && document.querySelector) {

const testRequireEnsureLink = document.querySelector('.test-require-ensure');
const logo = document.querySelector('.logo');
const logo = global.document.querySelector('.logo');

/** display logos */
const cssClasses = ['babel', 'npm', 'eslint', 'sass'];
Expand Down
Loading

0 comments on commit fa8d5d3

Please sign in to comment.