1.2.0 • Published 6 years ago

eslint-config-iddqd v1.2.0

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

eslint-config-iddqd

Basic usage

Install

npm install eslint eslint-config-iddqd

And add new section to the package.json:

"eslintConfig": {
  "extends": "iddqd/base"
}

Usage for ES6+ projects

Install

npm install eslint eslint-config-iddqd

And add new section to the package.json:

"eslintConfig": {
  "extends": "iddqd/es6"
}

Usage for Node.js 8+ projects

Install

npm install eslint eslint-config-iddqd babel-eslint

And add new section to the package.json:

"eslintConfig": {
  "extends": "iddqd/node",
  "parser": "babel-eslint"
}

If you use object spread (added in Node.js 8.7+), you can add follow lines

"eslintConfig": {
  "extends": "iddqd/node",
  "parser": "babel-eslint",
+ "parserOptions": {
+   "ecmaVersion": 2017,
+   "ecmaFeatures": {
+     "experimentalObjectRestSpread": true
+   }
+ }
}

Usage for React projects

Install

npm install eslint eslint-config-iddqd eslint-plugin-react eslint-plugin-import babel-eslint

And add new section to the package.json:

"eslintConfig": {
  "extends": "iddqd/react",
  "parser": "babel-eslint"
}

Usage for React projects with re-ordering of React component methods

Install

npm install eslint eslint-config-iddqd eslint-plugin-react eslint-plugin-import jscodeshift react-codemod

And add new sections to the package.json:

"scripts": {
    "sort-comp": "jscodeshift -t node_modules/react-codemod/transforms/sort-comp.js <path_to_components>"
},
"eslintConfig": {
  "extends": "iddqd/react",
  "parser": "babel-eslint",
  "rules": {
    "react/sort-comp": 2
  }
}
1.2.0

6 years ago

1.1.0

6 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago