Skip to content

Commit

Permalink
Add linting integration from ifit eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
chaddanna committed Apr 15, 2018
1 parent 923c03e commit 9b6921d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 49 deletions.
12 changes: 2 additions & 10 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": ["react"],
"extends": ["@ifit/eslint-config/react"],
"env": {
"browser": true,
"es6": true,
Expand All @@ -15,14 +15,6 @@
}
},
"rules": {
"indent": ["error", 2],
"react/jsx-curly-spacing": [
"error",
{
"when": "always",
"children": true,
"spacing": { "objectLiterals": "never" }
}
],
"react/jsx-curly-spacing": ["error", { "when": "always", "children": true, "spacing": { "objectLiterals": "never" } }],
}
}
19 changes: 12 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,27 @@
"scripts": {
"start": "npm run build-css && npm-run-all -p watch-css start-js",
"start-js": "react-scripts start",
"build":
"npm rebuild node-sass && npm run build-css && react-scripts build",
"build": "npm rebuild node-sass && npm run build-css && react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"build-css":
"node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/",
"lint": "eslint --ext .jsx --ext .js . --fix",
"build-css": "node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o src/",
"watch-css": "npm run build-css -- --watch --recursive"
},
"devDependencies": {
"@ifit/eslint-config": "^1.0.3",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"jest-enzyme": "^6.0.0",
"eslint": "^4.19.1",
"eslint-plugin-react": "^7.7.0"
"eslint-plugin-react": "^7.7.0",
"jest-enzyme": "^6.0.0"
},
"jest": {
"coverageReporters": ["json", "lcov", "text", "html"]
"coverageReporters": [
"json",
"lcov",
"text",
"html"
]
}
}
51 changes: 19 additions & 32 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
esutils "^2.0.2"
js-tokens "^3.0.0"

"@ifit/eslint-config@^1.0.3":
version "1.0.3"
resolved "https://registry.yarnpkg.com/@ifit/eslint-config/-/eslint-config-1.0.3.tgz#e19529a624b4e89ed69b494656db7b8b83550d18"
dependencies:
eslint-plugin-mocha "^4.11.0"
eslint-plugin-react "^7.3.0"

"@types/node@*":
version "9.6.5"
resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.5.tgz#ee700810fdf49ac1c399fc5980b7559b3e5a381d"
Expand Down Expand Up @@ -79,10 +86,6 @@ ajv-keywords@^2.0.0, ajv-keywords@^2.1.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762"

ajv-keywords@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.1.0.tgz#ac2b27939c543e95d2c06e7f7f5c27be4aa543be"

ajv@^4.9.1:
version "4.11.8"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536"
Expand All @@ -99,15 +102,6 @@ ajv@^5.0.0, ajv@^5.1.0, ajv@^5.1.5, ajv@^5.2.0, ajv@^5.2.3, ajv@^5.3.0:
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.3.0"

ajv@^6.0.1:
version "6.4.0"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.4.0.tgz#d3aff78e9277549771daf0164cff48482b754fc6"
dependencies:
fast-deep-equal "^1.0.0"
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.3.0"
uri-js "^3.0.2"

align-text@^0.1.1, align-text@^0.1.3:
version "0.1.4"
resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
Expand Down Expand Up @@ -2509,6 +2503,12 @@ [email protected]:
emoji-regex "^6.1.0"
jsx-ast-utils "^1.4.0"

eslint-plugin-mocha@^4.11.0:
version "4.12.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-4.12.1.tgz#dbacc543b178b4536ec5b19d7f8e8864d85404bf"
dependencies:
ramda "^0.25.0"

[email protected]:
version "7.4.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.4.0.tgz#300a95861b9729c087d362dd64abcc351a74364a"
Expand All @@ -2518,7 +2518,7 @@ [email protected]:
jsx-ast-utils "^2.0.0"
prop-types "^15.5.10"

eslint-plugin-react@^7.7.0:
eslint-plugin-react@^7.3.0, eslint-plugin-react@^7.7.0:
version "7.7.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.7.0.tgz#f606c719dbd8a1a2b3d25c16299813878cca0160"
dependencies:
Expand Down Expand Up @@ -6172,6 +6172,10 @@ railroad-diagrams@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz#eb7e6267548ddedfb899c1b90e57374559cddb7e"

ramda@^0.25.0:
version "0.25.0"
resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.25.0.tgz#8fdf68231cffa90bc2f9460390a0cb74a29b29a9"

[email protected]:
version "0.4.6"
resolved "https://registry.yarnpkg.com/randexp/-/randexp-0.4.6.tgz#e986ad5e5e31dae13ddd6f7b3019aa7c87f60ca3"
Expand Down Expand Up @@ -7347,7 +7351,7 @@ symbol-tree@^3.2.1, symbol-tree@^3.2.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6"

[email protected]:
[email protected], table@^4.0.1:
version "4.0.2"
resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36"
dependencies:
Expand All @@ -7358,17 +7362,6 @@ [email protected]:
slice-ansi "1.0.0"
string-width "^2.1.1"

table@^4.0.1:
version "4.0.3"
resolved "https://registry.yarnpkg.com/table/-/table-4.0.3.tgz#00b5e2b602f1794b9acaf9ca908a76386a7813bc"
dependencies:
ajv "^6.0.1"
ajv-keywords "^3.0.0"
chalk "^2.1.0"
lodash "^4.17.4"
slice-ansi "1.0.0"
string-width "^2.1.1"

tapable@^0.2.7:
version "0.2.8"
resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22"
Expand Down Expand Up @@ -7660,12 +7653,6 @@ upper-case@^1.1.1:
version "1.1.3"
resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598"

uri-js@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-3.0.2.tgz#f90b858507f81dea4dcfbb3c4c3dbfa2b557faaa"
dependencies:
punycode "^2.1.0"

urijs@^1.16.1:
version "1.19.1"
resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.1.tgz#5b0ff530c0cbde8386f6342235ba5ca6e995d25a"
Expand Down

0 comments on commit 9b6921d

Please sign in to comment.