eslint-config-scm
v1.0.14
Published
Common code style for scm
Downloads
26
Maintainers
Readme
eslint-config-scm
Supply Chain Group Generic Code Specification.
Use eslint-config-scm
to start your next project.
Why
At present, the internal project of the group is mainly personal maintenance and development. At the time of development, some people use airbnb and elemefe config or define their own eslint file, which leads to the project coding is not unified, so provide scaffold for next new project.
Rules
Most concerned:
- tab:
2 space
- semicolon:
never
How to use
First install dependencies
default
npm install --save-dev eslint babel-eslint eslint-config-scm
vue
npm install --save-dev eslint babel-eslint eslint-plugin-vue eslint-plugin-html eslint-config-scm
react
npm install --save-dev eslint babel-eslint eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y eslint-config-scm
angular
npm install --save-dev eslint babel-eslint eslint-config-angular eslint-config-scm
react-native
npm install --save-dev eslint babel-eslint eslint-config-react-native eslint-config-scm
typescript
npm install --save-dev eslint typescript-eslint-parser eslint-plugin-typescript
Then modify config file
Make a eslint config file(recommend .eslintrc.js
) then add the following configuration:
// defalut
{
extends: 'scm'
}
// vue
{
extends: 'scm/vue'
}
// react
{
extends: 'scm/react'
}
// angular
{
extends: 'scm/angular'
}
// react-native
{
extends: 'scm/react-native'
}
// typescript
{
extends: 'scm/typescript'
}
Contribution
If any problems are found during use, please create issue or submit PR.