diff --git a/Makefile b/Makefile index f0fb253..f28d50b 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ LINGUAS=$(basename $(notdir $(wildcard po/*.po))) po/POTFILES.js.in: mkdir -p $(dir $@) - find src/ -name '*.js' -o -name '*.jsx' -o -name '*.es6' > $@ + find src/ -name '*.js' -o -name '*.jsx' > $@ po/$(PACKAGE_NAME).js.pot: po/POTFILES.js.in xgettext --default-domain=cockpit --output=$@ --language=C --keyword= \ diff --git a/README.md b/README.md index 981e800..4700153 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ or # Running eslint Cockpit Starter Kit uses [ESLint](https://eslint.org/) to automatically check -JavaScript code style in `.jsx` and `.es6` files. +JavaScript code style in `.js` and `.jsx` files. The linter is executed within every build as a webpack preloader. diff --git a/package.json b/package.json index 3597de6..85701f1 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "scripts": { "watch": "webpack --watch", "build": "webpack", - "eslint": "eslint --ext .jsx --ext .es6 src/", - "eslint:fix": "eslint --fix --ext .jsx --ext .es6 src/" + "eslint": "eslint --ext .js --ext .jsx src/", + "eslint:fix": "eslint --fix --ext .js --ext .jsx src/" }, "devDependencies": { "@babel/core": "^7.0.0", diff --git a/src/index.es6 b/src/index.js similarity index 100% rename from src/index.es6 rename to src/index.js diff --git a/webpack.config.js b/webpack.config.js index ee6a182..eb78ca1 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -22,7 +22,7 @@ var production = process.env.NODE_ENV === 'production'; var info = { entries: { "index": [ - "./index.es6" + "./index.js" ] }, files: [ @@ -125,28 +125,12 @@ module.exports = { enforce: 'pre', exclude: /node_modules/, loader: 'eslint-loader', - test: /\.jsx$/ - }, - { - enforce: 'pre', - exclude: /node_modules/, - loader: 'eslint-loader', - test: /\.es6$/ + test: /\.(js|jsx)$/ }, { exclude: /node_modules/, use: babel_loader, - test: /\.js$/ - }, - { - exclude: /node_modules/, - use: babel_loader, - test: /\.jsx$/ - }, - { - exclude: /node_modules/, - use: babel_loader, - test: /\.es6$/ + test: /\.(js|jsx)$/ }, { exclude: /node_modules/,