Skip to content

Instantly share code, notes, and snippets.

@Aziaev
Created August 23, 2018 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aziaev/a81165ad542805ef7567ba250bbb7060 to your computer and use it in GitHub Desktop.
Save Aziaev/a81165ad542805ef7567ba250bbb7060 to your computer and use it in GitHub Desktop.
eslintrc and package.json
{
"extends": [
"standard",
"standard-react",
"plugin:react/recommended",
"plugin:jest/recommended",
"plugin:flowtype/recommended"
],
"plugins": [
"react",
"jest",
"flowtype"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2018,
"ecmaFeatures": {
"jsx": true
}
},
"settings": {
"react": {
"pragma": "React",
"version": "16.0"
}
},
"env": {
"browser": true,
"jquery": true,
"es6": true
},
"rules": {
"eqeqeq": "warn",
"semi": ["error", "always"],
"space-before-function-paren": ["error", "never"],
"camelcase": [1, {"properties": "never"}],
"comma-dangle": "off",
"no-bitwise": [
"error",
{
"allow": [
"~"
]
}
],
"quote-props": [
"error",
"as-needed",
{
"keywords": true
}
],
"quotes": [
"error",
"single",
{
"avoidEscape": true
}
],
"no-undefined": 0,
"no-plusplus": [
"error",
{
"allowForLoopAfterthoughts": true
}
],
"object-curly-newline": 0,
"no-ternary": 0,
"no-underscore-dangle": 0,
"linebreak-style": 0,
"operator-linebreak": ["warn", "after"],
"padded-blocks": 0,
"object-shorthand": 0,
"no-var": [
"error"
],
"sort-vars": 0,
"id-length": [
"off",
{
"exceptions": [
"$",
"_",
"i",
"j"
]
}
],
"max-len": [
"warn",
160,
4
],
"max-params": 0,
"max-statements": [
"error",
20
],
"multiline-ternary": "off",
"newline-before-return": "off",
"newline-per-chained-call": "off",
"object-curly-spacing": [
"error",
"always"
],
"prefer-arrow-callback": 0,
"prefer-reflect": 0,
"prefer-template": 0,
"spaced-comment": [
"error",
"always",
{
"markers": [
"global",
"eslint"
]
}
],
"no-invalid-this": 0,
"dot-location": 0,
"eol-last": 2,
"func-names": 0,
"global-require": 0,
"require-jsdoc": 0,
"valid-jsdoc": 0,
"sort-keys": 0,
"prefer-destructuring": 0,
"indent": [
"error",
2,
{
"SwitchCase": 1
}
],
"jsx-quotes": [
"error",
"prefer-double"
],
"react/jsx-indent": [
"error",
2
],
"react/jsx-indent-props": [
"error",
2
],
"react/jsx-closing-bracket-location": [
1,
"line-aligned"
]
}
}
{
"name": "app",
"version": "1",
"private": true,
"homepage": "/app/",
"dependencies": {
"babel-polyfill": "^6.26.0",
"bootstrap": "^4.1.1",
"classnames": "^2.2.6",
"flow-bin": "^0.79.1",
"history": "^4.7.2",
"isomorphic-fetch": "^2.2.1",
"moment": "^2.22.2",
"prop-types": "^15.6.2",
"react": "^16.4.1",
"react-datepicker": "^1.5.0",
"react-dom": "^16.4.1",
"react-redux": "^5.0.7",
"react-router-dom": "^4.3.1",
"react-router-redux": "^5.0.0-alpha.9",
"react-scripts": "1.1.4",
"react-select": "^1.2.1",
"reactstrap": "^6.1.0",
"redux": "^4.0.0",
"redux-devtools-extension": "^2.13.5",
"redux-form": "^7.4.2",
"redux-saga": "^0.16.0",
"reselect": "^3.0.1",
"styled-components": "^3.3.3",
"superagent": "^3.8.3"
},
"devDependencies": {
"eslint": "^5.4.0",
"eslint-config-standard": "^11.0.0",
"eslint-config-standard-react": "^6.0.0",
"eslint-loader": "^2.0.0",
"eslint-plugin-flowtype": "^2.50.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-jest": "^21.17.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.7.0",
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-standard": "^3.1.0"
},
"scripts": {
"lint": "eslint **/*.jsx --ignore-pattern node_modules/",
"flow": "flow",
"coverage": "npm test -- --coverage",
"test": "react-scripts test --env=jsdom --coverage",
"start": "react-scripts start",
"build": "react-scripts build",
"mockserver": "node mock/expressMockServer.js"
},
"jest": {
"collectCoverageFrom": [
"src/**/*.{js,jsx}",
"!<rootDir>/node_modules/",
"!<rootDir>/path/to/dir/",
"!src/registerServiceWorker.js",
"!**/constants.js",
"!**/constants/*",
"!**/initialState.js",
"!**/__test__/*"
],
"coverageThreshold": {
"global": {
"branches": 40,
"functions": 40,
"lines": 40,
"statements": 40
}
},
"coverageReporters": [
"lcov",
"clover",
"cobertura"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment