Skip to content

Instantly share code, notes, and snippets.

@vigzmv
Last active March 30, 2018 10:54
Show Gist options
  • Save vigzmv/add7e08c6cd5cd32cdbc28d44530050c to your computer and use it in GitHub Desktop.
Save vigzmv/add7e08c6cd5cd32cdbc28d44530050c to your computer and use it in GitHub Desktop.
_js-configs
{
"presets": ["env", "react", "babel-preset-stage-2"]
}
{
"extends": ["airbnb", "prettier", "prettier/react"],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 8,
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"impliedStrict": true,
"classes": true
}
},
"env": {
"browser": true,
"node": true,
"jquery": true
},
"rules": {
"no-unused-vars": [
1,
{
"argsIgnorePattern": "res|next|^err"
}
],
"arrow-body-style": [2, "as-needed"],
"no-param-reassign": [
2,
{
"props": false
}
],
"no-console": 0,
"import": 0,
"func-names": 0,
"space-before-function-paren": 0,
"comma-dangle": 1,
"max-len": 0,
"import/extensions": 0,
"no-underscore-dangle": 0,
"consistent-return": 0,
"react/display-name": 1,
"react/react-in-jsx-scope": 0,
"react/forbid-prop-types": 0,
"react/no-unescaped-entities": 0,
"react/jsx-filename-extension": [
1,
{
"extensions": [".js", ".jsx"]
}
],
"radix": 0,
"no-shadow": [
2,
{
"hoist": "all",
"allow": ["resolve", "reject", "done", "next", "err", "error"]
}
],
"quotes": [
2,
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"prettier/prettier": [
"error",
{
"trailingComma": "all",
"singleQuote": true,
"printWidth": 100
}
],
"jsx-a11y/href-no-hash": "off",
"jsx-a11y/anchor-is-valid": [
"warn",
{
"aspects": ["invalidHref"]
}
]
},
"plugins": ["eslint-plugin-html", "prettier"]
}
npm install --save-dev \
prettier-eslint \
eslint-config-prettier \
eslint-plugin-prettier \
eslint-plugin-html \
babel-eslint \
babel-preset-stage-2 \
&& \
(
export PKG=eslint-config-airbnb;
npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
)
{
"name": "",
"version": "1.0.0",
"main": "index.js",
"repository": "",
"author": "vigzmv <[email protected]>",
"license": "MIT",
"dependencies": {
"react": "^16.2.0",
"react-dom": "^16.2.0"
},
"devDependencies": {
"babel-eslint": "^8.0.3",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"eslint": "^4.13.1",
"eslint-config-airbnb": "^16.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-html": "^4.0.1",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-prettier": "^2.4.0",
"eslint-plugin-react": "^7.5.1",
"parcel-bundler": "^1.2.0",
"prettier-eslint": "^8.3.1"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment