Skip to content

Commit 0511193

Browse files
committed
Chore: update dependencies
1 parent b9c2701 commit 0511193

25 files changed

+294
-246
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"presets": [
33
[
4-
"env",
4+
"@babel/preset-env",
55
{
66
"useBuiltIns": "usage",
77
"modules": false,

.eslintrc.json

Lines changed: 0 additions & 34 deletions
This file was deleted.

.eslintrc.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
root: true
2+
extends:
3+
- plugin:@mysticatea/es2018
4+
- plugin:@mysticatea/+modules
5+
- plugin:@mysticatea/+browser
6+
7+
rules:
8+
require-unicode-regexp: off
9+
10+
overrides:
11+
- files: "*.vue"
12+
rules:
13+
"@mysticatea/vue/component-name-in-template-casing": [error, kebab-case]
14+
require-noopener: error

eslint-rules/.eslintrc.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

eslint-rules/.eslintrc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
root: true
2+
extends:
3+
- plugin:@mysticatea/es2018
4+
- plugin:@mysticatea/+eslint-plugin

eslint-rules/require-noopener.js

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,34 @@
11
"use strict"
22

3-
module.exports = (context) =>
3+
module.exports = context =>
44
context.parserServices.defineTemplateBodyVisitor({
55
"VElement[name='a']"(node) {
66
const attributes = node.startTag.attributes
7-
const hasTargetBlank = attributes.some(attribute =>
8-
!attribute.directive &&
9-
attribute.key.name === "target" &&
10-
attribute.value != null &&
11-
attribute.value.value === "_blank"
7+
const hasTargetBlank = attributes.some(
8+
attribute =>
9+
!attribute.directive &&
10+
attribute.key.name === "target" &&
11+
attribute.value != null &&
12+
attribute.value.value === "_blank",
1213
)
13-
const hasRelNoopener = attributes.some(attribute =>
14-
!attribute.directive &&
15-
attribute.key.name === "rel" &&
16-
attribute.value != null &&
17-
attribute.value.value === "noopener"
14+
const hasRelNoopener = attributes.some(
15+
attribute =>
16+
!attribute.directive &&
17+
attribute.key.name === "rel" &&
18+
attribute.value != null &&
19+
attribute.value.value === "noopener",
1820
)
1921

2022
if (hasTargetBlank && !hasRelNoopener) {
2123
context.report({
2224
node: node.startTag,
2325
message: "Use 'rel=\"noopener\"' to open new tab.",
24-
* fix(fixer) {
26+
*fix(fixer) {
2527
const lastAttribute = attributes[attributes.length - 1]
26-
yield fixer.insertTextAfter(lastAttribute, " rel=\"noopener\"")
28+
yield fixer.insertTextAfter(
29+
lastAttribute,
30+
' rel="noopener"',
31+
)
2732
},
2833
})
2934
}

package.json

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,32 @@
1010
],
1111
"dependencies": {},
1212
"devDependencies": {
13+
"@babel/core": "^7.1.2",
14+
"@babel/preset-env": "^7.1.0",
15+
"@mysticatea/eslint-plugin": "^6.0.0",
1316
"appcache-manifest": "^2.1.0",
14-
"babel-core": "^6.26.0",
15-
"babel-eslint": "^8.2.1",
16-
"babel-loader": "^7.1.2",
17-
"babel-minify-webpack-plugin": "^0.2.0",
18-
"babel-preset-env": "^1.6.1",
17+
"babel-eslint": "^10.0.1",
18+
"babel-loader": "^8.0.4",
1919
"cpx": "^1.5.0",
2020
"cross-env": "^5.1.1",
21-
"css-loader": "^0.28.7",
22-
"eslint": "^4.15.0",
23-
"eslint-config-mysticatea": "^12.0.0",
24-
"eslint-plugin-vue": "^4.2.0",
25-
"file-loader": "^1.1.5",
21+
"css-loader": "^1.0.0",
22+
"eslint": "^5.7.0",
23+
"eslint-plugin-vue": "^5.0.0-beta.3",
24+
"file-loader": "^2.0.0",
2625
"lodash": "^4.17.4",
2726
"material-design-icons": "^3.0.1",
2827
"monaco-editor": "^0.10.1",
2928
"npm-run-all": "^4.1.2",
3029
"pako": "^1.0.6",
3130
"rimraf": "^2.6.2",
32-
"shelljs": "^0.7.8",
31+
"shelljs": "^0.8.2",
3332
"string-replace-loader": "^1.3.0",
3433
"vue": "^2.5.9",
35-
"vue-eslint-parser": "^2.0.2",
36-
"vue-loader": "^13.5.0",
34+
"vue-eslint-parser": "^3.2.2",
35+
"vue-loader": "^15.4.2",
3736
"vue-template-compiler": "^2.5.9",
38-
"webpack": "^3.8.1",
39-
"webpack-dev-server": "^2.9.5"
37+
"webpack": "^4.21.0",
38+
"webpack-dev-server": "^3.1.9"
4039
},
4140
"scripts": {
4241
"build": "cross-env NODE_ENV=production run-s clean build:*",
@@ -47,7 +46,7 @@
4746
"build:versions": "node scripts/make-versions",
4847
"clean": "rimraf dist",
4948
"deploy": "node scripts/deploy",
50-
"lint": "eslint . --rulesdir eslint-rules",
49+
"lint": "eslint . --ext .js,.vue --rulesdir eslint-rules",
5150
"preversion": "run-s lint build -s",
5251
"postversion": "git push --tags && git push",
5352
"update-deps": "npm install eslint@latest eslint-plugin-vue@latest vue-eslint-parser@latest babel-eslint@latest",

scripts/.eslintrc.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

scripts/copy-monaco.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ console.log("> cpx", glob, dist, ...args)
3030
const cp = childProcess.spawn(
3131
process.execPath,
3232
[binFile, glob, dist, ...args],
33-
{ stdio: "inherit" }
33+
{ stdio: "inherit" },
3434
)
35-
cp.on("exit", (exitCode) => {
35+
cp.on("exit", exitCode => {
3636
process.exitCode = exitCode
3737
})

scripts/deploy.js

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
const sh = require("shelljs")
88
const version = require("../package.json").version
9-
const ATOKEN = process.env.ATOKEN //eslint-disable-line no-process-env
9+
const ATOKEN = process.env.ATOKEN
1010

1111
//------------------------------------------------------------------------------
1212
// Helpers
@@ -53,10 +53,11 @@ exec("npm run build")
5353

5454
// Load gh-pages.
5555
if (ATOKEN) {
56-
exec("git fetch --depth=1 https://github.com/mysticatea/vue-eslint-demo.git gh-pages:gh-pages")
56+
exec(
57+
"git fetch --depth=1 https://github.com/mysticatea/vue-eslint-demo.git gh-pages:gh-pages",
58+
)
5759
exec("git checkout gh-pages")
58-
}
59-
else {
60+
} else {
6061
exec("git checkout gh-pages")
6162
exec("git pull")
6263
}
@@ -72,8 +73,14 @@ if (newVersions !== oldVersions) {
7273
rm("-rf", "vs", "index.*")
7374
cp("-r", "dist/*", ".")
7475
exec("git add -A")
75-
exec("git commit -m \"Update: website\"")
76-
exec(`git push${ATOKEN ? ` https://mysticatea:${ATOKEN}@github.com/mysticatea/vue-eslint-demo.git gh-pages:gh-pages` : ""}`)
76+
exec('git commit -m "Update: website"')
77+
exec(
78+
`git push${
79+
ATOKEN
80+
? ` https://mysticatea:${ATOKEN}@github.com/mysticatea/vue-eslint-demo.git gh-pages:gh-pages`
81+
: ""
82+
}`,
83+
)
7784
}
7885

7986
// Back to master.

0 commit comments

Comments
 (0)