aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--package.json4
-rw-r--r--rollup.config.js6
-rw-r--r--src/rules/vue/default.json1
-rw-r--r--src/vue-javascript.ts19
-rw-r--r--src/vue-typescript.ts20
-rw-r--r--yarn.lock22
7 files changed, 71 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 90e2cf1..232ea35 100644
--- a/.gitignore
+++ b/.gitignore
@@ -199,5 +199,8 @@ $RECYCLE.BIN/
# Resulting code
/_tslib-*.js
+/default-*.js
/javascript.js
/typescript.js
+/vue-javascript.js
+/vue-typescript.js
diff --git a/package.json b/package.json
index e93d241..2e5ec8b 100644
--- a/package.json
+++ b/package.json
@@ -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": {}
}
diff --git a/rollup.config.js b/rollup.config.js
index c7e9032..d22bb39 100644
--- a/rollup.config.js
+++ b/rollup.config.js
@@ -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: ".",
diff --git a/src/rules/vue/default.json b/src/rules/vue/default.json
new file mode 100644
index 0000000..0967ef4
--- /dev/null
+++ b/src/rules/vue/default.json
@@ -0,0 +1 @@
+{}
diff --git a/src/vue-javascript.ts b/src/vue-javascript.ts
new file mode 100644
index 0000000..a3c7a46
--- /dev/null
+++ b/src/vue-javascript.ts
@@ -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 },
+};
diff --git a/src/vue-typescript.ts b/src/vue-typescript.ts
new file mode 100644
index 0000000..bbef943
--- /dev/null
+++ b/src/vue-typescript.ts
@@ -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 },
+};
diff --git a/yarn.lock b/yarn.lock
index 9f25d6e..7b4822a 100644
--- a/yarn.lock
+++ b/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"