DEPRECATED. Check @modyqyw/fabric.
An ESLint shareable config for JavaScript/TypeScript/React/ReactNative/Taro/Vue2/Vue3/UniApp projects.
npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
extends: ["@modyqyw"],
};
npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
extends: ["@modyqyw"],
};
npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
extends: ["@modyqyw/eslint-config/react"],
};
npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
extends: ["@modyqyw/eslint-config/react"],
};
npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
extends: ["@modyqyw/eslint-config/vue2"],
};
npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
extends: ["@modyqyw/eslint-config/vue2-typescript"],
};
npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
extends: ["@modyqyw/eslint-config/vue3"],
};
npm i -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
# or
# yarn add -D babel-eslint@~10.1.0 eslint@~7.13.0 @modyqyw/eslint-config@~1.9.4 @typescript-eslint/parser@~4.8.1 @typescript-eslint/eslint-plugin@~4.8.1 typescript@~4.1.2
// {PROJECT_DIR}/.eslintrc.js
module.exports = {
extends: ["@modyqyw/eslint-config/vue3-typescript"],
};
- Install plugins.
- Set up
Settings.json
. ThenF1 => Format Document
=>F1 => File: Save
.
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue"
],
"files.eol": "\n",
"files.associations": {
"*.wxml": "html",
"*.wxs": "javascript",
"*.wxss": "css",
"*.axml": "html",
"*.sjs": "javascript",
"*.acss": "css",
"*.swan": "html",
"*.ttml": "html",
"*.ttss": "css",
"*.jxml": "html",
"*.jxss": "css",
"*.wpy": "vue",
"*.nvue": "vue",
"*.ux": "vue"
},
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
}
}
@modyqyw/prettier-config
- Github Gitee@modyqyw/eslint-config
- Github Gitee@modyqyw/stylelint-config
- Github Gitee
@modyqyw/eslint-config
and @modyqyw/stylelint-config
do not use any Prettier
config and plugin, while @modyqyw/fabric
does.
Copyright (c) 2020-present MillCloud