Package Exports
- @cuiko/eslint-config
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@cuiko/eslint-config) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
eslint-config
Base on eslint-config-for.
- Eslint
- TypeScript
- React
- Vue
- Prettier
===
Install
# npm
npm i @cuiko/eslint-config -D
# yarn
yarn add @cuiko/eslint-config -D===
Dependency
Eslint Support
# npm
npm i eslint -D
# yarn
yarn add eslint -DIf you're using
babel, you also need to installbabel-eslint.
# npm
npm i babel-eslint -D
# yarn
yarn add babel-eslint -DTypeScript Support
# npm
npm i @typescript-eslint/eslint-plugin @typescript-eslint/parser -D
# yarn
yarn add @typescript-eslint/eslint-plugin @typescript-eslint/parser -DReact Support
# npm
npm i eslint-plugin-react -D
# yarn
yarn add eslint-plugin-react -DVue Support
# npm
npm i eslint-plugin-vue -D
# yarn
yarn add eslint-plugin-vue -DPrettier Support
If you
IDEhave been supported, you don't have to execute the following command.
# npm
npm i prettier -D
# yarn
yarn add prettier -DExec Eslint with Prettier
# npm
npm i prettier eslint-plugin-prettier -D
# yarn
yarn add prettier eslint-plugin-prettier -DPrettier Extend
# npm
npm i prettier eslint-config-prettier -D
# yarn
yarn add prettier eslint-config-prettier -D===
Usage
Use Prettier Config
// .prettierrc.js
module.exports = {
...require('@cuiko/eslint-config/prettier-config')
}Use Prettier Plugin
Exec Eslint with Prettier
// .eslintrc.js
module.exports = {
extends: ['@cuiko/eslint-config/prettier-plugin'],
}Use Prettier Extend
Prettier Extend
// .eslintrc.js
module.exports = {
extends: ['@cuiko/eslint-config/prettier-extend'],
}Use React Config
// .eslintrc.js
module.exports = {
extends: ['@cuiko/eslint-config/react'],
}Use Vue Config
// .eslintrc.js
module.exports = {
extends: ['@cuiko/eslint-config/vue'],
}Use TypeScript Config
// .eslintrc.js
module.exports = {
extends: ['@cuiko/eslint-config/typescript'],
}