Enable react linting rules, fix linting errors

Also fix lint command in `package.json`
This commit is contained in:
Jordan Eldredge 2016-09-06 18:11:37 -07:00
parent 4869bfdf1f
commit 7dd1bb8858
4 changed files with 8 additions and 4 deletions

View file

@ -110,6 +110,9 @@
"quote-props": ["warn", "consistent-as-needed"],
"quotes": ["error", "single", "avoid-escape"],
"radix": "error",
"react/wrap-multilines": "error",
"react/no-string-refs": "error",
"react/jsx-boolean-value": "error",
"react/jsx-closing-bracket-location": ["error", "line-aligned"],
"react/jsx-curly-spacing": "error",
"react/jsx-equals-spacing": "error",
@ -119,6 +122,8 @@
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/prefer-stateless-function": "error",
"react/prefer-es6-class": "error",
"react/jsx-pascal-case": "error",
"react/require-render-return": "error",
"react/self-closing-comp": "error",
"semi": "error",

View file

@ -1,8 +1,7 @@
jest.unmock('../components/EqGraph.jsx');
import {
roundToEven,
getY
roundToEven
} from '../components/EqGraph.jsx';
describe('roundToEven', () => {

View file

@ -4,7 +4,7 @@
"description": "Winamp 2 implemented in HTML5 and JavaScript",
"main": "index.html",
"scripts": {
"lint": "eslint js/*.js js/*.jsx",
"lint": "eslint js/*.js js/*.jsx .",
"build": "webpack --config=webpack.production.config.js",
"serve": "webpack-dev-server",
"weight": "npm run build && gzip-size built/winamp.js | pretty-bytes",

View file

@ -11,7 +11,7 @@ config.plugins = (config.plugins || []).concat([
]);
config.entry = (config.entry || []).concat([
'./js/googleAnalytics.min.js'
'./js/googleAnalytics.min.js'
]);
module.exports = config;