feat(vue): Initial Vue config
Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
parent
d28e9d909b
commit
6a5695c0b7
3
.gitignore
vendored
3
.gitignore
vendored
@ -199,5 +199,8 @@ $RECYCLE.BIN/
|
||||
|
||||
# Resulting code
|
||||
/_tslib-*.js
|
||||
/default-*.js
|
||||
/javascript.js
|
||||
/typescript.js
|
||||
/vue-javascript.js
|
||||
/vue-typescript.js
|
||||
|
@ -21,6 +21,7 @@
|
||||
"eslint-plugin-security": "^1.4.0",
|
||||
"eslint-plugin-sonarjs": "^0.5.0",
|
||||
"eslint-plugin-unicorn": "^16.1.1",
|
||||
"eslint-plugin-vue": "^6.1.2",
|
||||
"rollup": "^1.31.1",
|
||||
"rollup-plugin-terser": "^5.2.0",
|
||||
"tslib": "^1.10.0",
|
||||
@ -34,7 +35,8 @@
|
||||
"eslint-plugin-import": "^2.20.1",
|
||||
"eslint-plugin-security": "^1.4.0",
|
||||
"eslint-plugin-sonarjs": "^0.5.0",
|
||||
"eslint-plugin-unicorn": "^16.1.1"
|
||||
"eslint-plugin-unicorn": "^16.1.1",
|
||||
"eslint-plugin-vue": "^6.1.2"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
|
@ -4,8 +4,10 @@ import typescript from "@rollup/plugin-typescript";
|
||||
|
||||
module.exports = {
|
||||
input: {
|
||||
javascript: "src/javascript.ts",
|
||||
typescript: "src/typescript.ts",
|
||||
"javascript": "src/javascript.ts",
|
||||
"typescript": "src/typescript.ts",
|
||||
"vue-javascript": "src/vue-javascript.ts",
|
||||
"vue-typescript": "src/vue-typescript.ts",
|
||||
},
|
||||
output: {
|
||||
dir: ".",
|
||||
|
1
src/rules/vue/default.json
Normal file
1
src/rules/vue/default.json
Normal file
@ -0,0 +1 @@
|
||||
{}
|
19
src/vue-javascript.ts
Normal file
19
src/vue-javascript.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import rDefault from "./rules/vue/default.json";
|
||||
|
||||
module.exports = {
|
||||
"extends": [
|
||||
"./javascript",
|
||||
"plugin:vue/base",
|
||||
"plugin:vue/essential",
|
||||
"plugin:vue/recommended",
|
||||
"plugin:vue/strongly-recommended",
|
||||
],
|
||||
"parser": "vue-eslint-parser",
|
||||
"parserOptions": {
|
||||
extraFileExtensions: [
|
||||
".vue",
|
||||
],
|
||||
},
|
||||
"plugins": ["vue"],
|
||||
"rules": { ...rDefault },
|
||||
};
|
20
src/vue-typescript.ts
Normal file
20
src/vue-typescript.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import rDefault from "./rules/vue/default.json";
|
||||
|
||||
module.exports = {
|
||||
"extends": [
|
||||
"./typescript",
|
||||
"plugin:vue/base",
|
||||
"plugin:vue/essential",
|
||||
"plugin:vue/recommended",
|
||||
"plugin:vue/strongly-recommended",
|
||||
],
|
||||
"parser": "vue-eslint-parser",
|
||||
"parserOptions": {
|
||||
extraFileExtensions: [
|
||||
".vue",
|
||||
],
|
||||
parser: "@typescript-eslint/parser",
|
||||
},
|
||||
"plugins": ["vue"],
|
||||
"rules": { ...rDefault },
|
||||
};
|
22
yarn.lock
22
yarn.lock
@ -453,6 +453,14 @@ eslint-plugin-unicorn@^16.1.1:
|
||||
safe-regex "^2.1.1"
|
||||
semver "^7.1.2"
|
||||
|
||||
eslint-plugin-vue@^6.1.2:
|
||||
version "6.1.2"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-6.1.2.tgz#4b05c28c83c0ec912669b64dbd998bb8bf692ef6"
|
||||
integrity sha512-M75oAB+2a/LNkLKRbeEaS07EjzjIUaV7/hYoHAfRFeeF8ZMmCbahUn8nQLsLP85mkar24+zDU3QW2iT1JRsACw==
|
||||
dependencies:
|
||||
semver "^5.6.0"
|
||||
vue-eslint-parser "^7.0.0"
|
||||
|
||||
eslint-scope@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9"
|
||||
@ -1359,7 +1367,7 @@ safe-regex@^2.1.1:
|
||||
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
||||
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
||||
|
||||
"semver@2 || 3 || 4 || 5", semver@^5.5.0:
|
||||
"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.6.0:
|
||||
version "5.7.1"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
|
||||
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
|
||||
@ -1611,6 +1619,18 @@ validate-npm-package-license@^3.0.1:
|
||||
spdx-correct "^3.0.0"
|
||||
spdx-expression-parse "^3.0.0"
|
||||
|
||||
vue-eslint-parser@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-7.0.0.tgz#a4ed2669f87179dedd06afdd8736acbb3a3864d6"
|
||||
integrity sha512-yR0dLxsTT7JfD2YQo9BhnQ6bUTLsZouuzt9SKRP7XNaZJV459gvlsJo4vT2nhZ/2dH9j3c53bIx9dnqU2prM9g==
|
||||
dependencies:
|
||||
debug "^4.1.1"
|
||||
eslint-scope "^5.0.0"
|
||||
eslint-visitor-keys "^1.1.0"
|
||||
espree "^6.1.2"
|
||||
esquery "^1.0.1"
|
||||
lodash "^4.17.15"
|
||||
|
||||
which@^1.2.9:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
|
||||
|
Loading…
x
Reference in New Issue
Block a user