Commit c23c28d7 by hfpp2012 yinsigan

add prettier

1 parent ff857438
...@@ -24,7 +24,7 @@ module.exports = { ...@@ -24,7 +24,7 @@ module.exports = {
parser: 'babel-eslint', parser: 'babel-eslint',
// import plugin is temporarily disabled, scroll below to see why // import plugin is temporarily disabled, scroll below to see why
plugins: [/*'import', */'flowtype', 'jsx-a11y', 'react'], plugins: [/*'import', */'flowtype', 'jsx-a11y', 'react', "prettier"],
env: { env: {
browser: true, browser: true,
...@@ -58,6 +58,7 @@ module.exports = { ...@@ -58,6 +58,7 @@ module.exports = {
}, },
rules: { rules: {
"prettier/prettier": "warn",
// http://eslint.org/docs/rules/ // http://eslint.org/docs/rules/
'array-callback-return': 'warn', 'array-callback-return': 'warn',
'default-case': ['warn', { commentPattern: '^no default$' }], 'default-case': ['warn', { commentPattern: '^no default$' }],
......
node_modules node_modules
deps
...@@ -43,10 +43,12 @@ ...@@ -43,10 +43,12 @@
"eslint-loader": "^1.7.1", "eslint-loader": "^1.7.1",
"eslint-plugin-flowtype": "^2.33.0", "eslint-plugin-flowtype": "^2.33.0",
"eslint-plugin-jsx-a11y": "^4.0.0", "eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-prettier": "^2.1.2",
"eslint-plugin-react": "^7.0.1", "eslint-plugin-react": "^7.0.1",
"extract-text-webpack-plugin": "^2.1.0", "extract-text-webpack-plugin": "^2.1.0",
"node-sass": "^4.5.3", "node-sass": "^4.5.3",
"open-browser-webpack-plugin": "^0.0.5", "open-browser-webpack-plugin": "^0.0.5",
"prettier": "^1.5.2",
"sass-loader": "^6.0.5", "sass-loader": "^6.0.5",
"style-loader": "^0.17.0", "style-loader": "^0.17.0",
"webpack-dashboard": "^0.4.0" "webpack-dashboard": "^0.4.0"
......
import React from 'react' import React from "react"
import ReactDOM from 'react-dom' import ReactDOM from 'react-dom'
import Spd from './containers/Spd' import Spd from './containers/Spd'
import { import {
......
...@@ -1993,6 +1993,13 @@ eslint-plugin-jsx-a11y@^4.0.0: ...@@ -1993,6 +1993,13 @@ eslint-plugin-jsx-a11y@^4.0.0:
jsx-ast-utils "^1.0.0" jsx-ast-utils "^1.0.0"
object-assign "^4.0.1" object-assign "^4.0.1"
eslint-plugin-prettier@^2.1.2:
version "2.1.2"
resolved "http://registry.npm.taobao.org/eslint-plugin-prettier/download/eslint-plugin-prettier-2.1.2.tgz#4b90f4ee7f92bfbe2e926017e1ca40eb628965ea"
dependencies:
fast-diff "^1.1.1"
jest-docblock "^20.0.1"
eslint-plugin-react@^7.0.1: eslint-plugin-react@^7.0.1:
version "7.0.1" version "7.0.1"
resolved "http://registry.npm.taobao.org/eslint-plugin-react/download/eslint-plugin-react-7.0.1.tgz#e78107e1e559c6e2b17786bb67c2e2a010ad0d2f" resolved "http://registry.npm.taobao.org/eslint-plugin-react/download/eslint-plugin-react-7.0.1.tgz#e78107e1e559c6e2b17786bb67c2e2a010ad0d2f"
...@@ -2180,6 +2187,10 @@ extsprintf@1.0.2: ...@@ -2180,6 +2187,10 @@ extsprintf@1.0.2:
version "1.0.2" version "1.0.2"
resolved "http://registry.npm.taobao.org/extsprintf/download/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" resolved "http://registry.npm.taobao.org/extsprintf/download/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550"
fast-diff@^1.1.1:
version "1.1.1"
resolved "http://registry.npm.taobao.org/fast-diff/download/fast-diff-1.1.1.tgz#0aea0e4e605b6a2189f0e936d4b7fbaf1b7cfd9b"
fast-levenshtein@~2.0.4: fast-levenshtein@~2.0.4:
version "2.0.6" version "2.0.6"
resolved "http://registry.npm.taobao.org/fast-levenshtein/download/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" resolved "http://registry.npm.taobao.org/fast-levenshtein/download/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
...@@ -2978,6 +2989,10 @@ isstream@~0.1.2: ...@@ -2978,6 +2989,10 @@ isstream@~0.1.2:
version "0.1.2" version "0.1.2"
resolved "http://registry.npm.taobao.org/isstream/download/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" resolved "http://registry.npm.taobao.org/isstream/download/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
jest-docblock@^20.0.1:
version "20.0.3"
resolved "http://registry.npm.taobao.org/jest-docblock/download/jest-docblock-20.0.3.tgz#17bea984342cc33d83c50fbe1545ea0efaa44712"
jodid25519@^1.0.0: jodid25519@^1.0.0:
version "1.0.2" version "1.0.2"
resolved "http://registry.npm.taobao.org/jodid25519/download/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" resolved "http://registry.npm.taobao.org/jodid25519/download/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967"
...@@ -4041,6 +4056,10 @@ preserve@^0.2.0: ...@@ -4041,6 +4056,10 @@ preserve@^0.2.0:
version "0.2.0" version "0.2.0"
resolved "http://registry.npm.taobao.org/preserve/download/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" resolved "http://registry.npm.taobao.org/preserve/download/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
prettier@^1.5.2:
version "1.5.2"
resolved "http://registry.npm.taobao.org/prettier/download/prettier-1.5.2.tgz#7ea0751da27b93bfb6cecfcec509994f52d83bb3"
pretty-error@^2.0.2: pretty-error@^2.0.2:
version "2.1.0" version "2.1.0"
resolved "http://registry.npm.taobao.org/pretty-error/download/pretty-error-2.1.0.tgz#87f4e9d706a24c87d6cbee9fabec001fcf8c75d8" resolved "http://registry.npm.taobao.org/pretty-error/download/pretty-error-2.1.0.tgz#87f4e9d706a24c87d6cbee9fabec001fcf8c75d8"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!