diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..f9a5062 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,37 @@ +{ + "rules": { + "indent": [ + 1, + "tab" + ], + "quotes": [ + 1, + "single" + ], + "linebreak-style": [ + 1, + "windows" + ], + "semi": [ + 1, + "never" + ] + }, + "env": { + "es6": true, + "browser": true, + "node" : true + }, + "extends": "eslint:recommended", + "ecmaFeatures": { + "jsx": true, + "experimentalObjectRestSpread": true, + "modules": true + }, + "plugins": [ + "react" + ], + "globals": { + "__DEBUG__": true + } +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index bc52912..e2928ca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules dist *.sublime-project -*.sublime-workspace \ No newline at end of file +*.sublime-workspace +npm-debug.log \ No newline at end of file diff --git a/package.json b/package.json index 2b2275d..bf8afc9 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,14 @@ { "name": "react-boilerplate", - "version": "0.1.2", + "version": "0.1.3", "description": "a react boilerplate", "main": "main.js", "dependencies": { "es5-shim": "^4.3.1", "es6-promise": "^3.0.2", "react": "^0.14.3", - "react-dom": "^0.14.3" + "react-dom": "^0.14.3", + "whatwg-fetch": "^0.10.1" }, "devDependencies": { "autoprefixer": "^6.1.1", @@ -15,9 +16,10 @@ "babel-loader": "^6.2.0", "babel-preset-es2015": "^6.1.18", "babel-preset-react": "^6.1.18", - "babel-preset-stage-2": "^6.1.18", "css-loader": "^0.23.0", "cssgrace": "^3.0.0", + "eslint": "^1.10.3", + "eslint-plugin-react": "^3.11.3", "exports-loader": "^0.6.2", "extract-text-webpack-plugin": "^0.9.1", "file-loader": "^0.8.5", @@ -36,6 +38,7 @@ }, "scripts": { "start": "node ./server.js", + "lint": "eslint ./src", "test": "echo \"Error: no test specified\" && exit 1", "deploy": "webpack --config webpack.config.js" }, diff --git a/src/scripts/components/app.js b/src/scripts/components/app.js index cb96121..55a3190 100644 --- a/src/scripts/components/app.js +++ b/src/scripts/components/app.js @@ -1,9 +1,9 @@ -import React from 'react'; +import React from 'react' export default class App extends React.Component { render() { return (