@glossgenius/eslint-config v1.0.7
GlossGenius JavaScript Style Guide
Table of contents
Installation
Please notice you can install additional packages with npm or yarn.
Via npm
npm install --save-dev eslint eslint-plugin-import @glossgenius/eslint-configVia yarn
yarn add -D eslint eslint-plugin-import @glossgenius/eslint-configHow to use
Depends of what main JS framework you have, you might need a different
eslint configuration. Below you can find files you need to use in
your extends directive.
Please notice you can use JS or JSON config type for eslint.
Vanilla JS aka pure JavaScript
Additional packages
Additionally you need to install:
- babel-eslint
Via npm
npm install --save-dev babel-eslintVia yarn
yarn add -D babel-eslintEslint Config
If you use JS type:
// .eslintrc.js
module.exports = {
extends: '@glossgenius'
}If you use JSON type:
// .eslintrc.json
{
"extends": "@glossgenius"
}React
Additional packages
Additionally you need to install:
- babel-eslint
- eslint-plugin-react
- eslint-plugin-jsx-a11y
Via npm
npm install --save-dev babel-eslint eslint-plugin-react eslint-plugin-jsx-a11yVia yarn
yarn add -D babel-eslint eslint-plugin-react eslint-plugin-jsx-a11yEslint Config
If you use JS type:
// .eslintrc.js
module.exports = {
extends: '@glossgenius/eslint-config/react'
}If you use JSON type:
// .eslintrc.json
{
"extends": "@glossgenius/eslint-config/react"
}React Native
Additional packages
For React Native you need exactly the same additional packages as for React (please see above)
Eslint Config
If you use JS type:
// .eslintrc.js
module.exports = {
extends: '@glossgenius/eslint-config/react-native'
}If you use JSON type:
// .eslintrc.json
{
"extends": "@glossgenius/eslint-config/react-native"
}Vue.js
Additional packages
Additionally you need to install:
- eslint-plugin-vue
Via npm
npm install --save-dev eslint-plugin-vueVia yarn
yarn add -D eslint-plugin-vueEslint Config
If you use JS type:
// .eslintrc.js
module.exports = {
extends: '@glossgenius/eslint-config/vue'
}If you use JSON type:
// .eslintrc.json
{
"extends": "@glossgenius/eslint-config/vue"
}Contributing
You are more than welcome to make contribution. Please follow our contribution guidelines.
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago