Skip to content

Commit 120646d

Browse files
trailingComma
1 parent cf8508b commit 120646d

13 files changed

+71
-71
lines changed

.eslintrc.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
module.exports = {
22
root: true,
33
env: {
4-
node: true,
4+
node: true
55
},
66
extends: ["plugin:vue/essential", "@vue/prettier"],
77
rules: {
88
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
9-
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
9+
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off"
1010
},
1111
parserOptions: {
12-
parser: "babel-eslint",
13-
},
12+
parser: "babel-eslint"
13+
}
1414
};

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"semi": true,
33
"singleQuote": false,
4-
"trailingComma":"all",
4+
"trailingComma":"none",
55
"printWidth": 150,
66
"bracketSpacing": true,
77
"jsxBracketSameLine": true,

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: ["@vue/cli-plugin-babel/preset"],
2+
presets: ["@vue/cli-plugin-babel/preset"]
33
};

jest.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ module.exports = {
33
transform: {
44
"^.+\\.vue$": "vue-jest",
55
".+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$": "jest-transform-stub",
6-
"^.+\\.jsx?$": "babel-jest",
6+
"^.+\\.jsx?$": "babel-jest"
77
},
88
transformIgnorePatterns: ["/node_modules/"],
99
moduleNameMapper: {
1010
"^@/(.*)$": "<rootDir>/src/$1",
11-
"^plotly.js$": "<rootDir>/tests/mocks/plotly.js",
11+
"^plotly.js$": "<rootDir>/tests/mocks/plotly.js"
1212
},
1313
snapshotSerializers: ["jest-serializer-vue"],
1414
testMatch: ["**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"],
1515
collectCoverageFrom: ["<rootDir>/src/**/*.*"],
1616
testURL: "http://localhost/",
17-
setupFiles: ["jest-canvas-mock", "<rootDir>/tests/helpers/mockUrl.js"],
17+
setupFiles: ["jest-canvas-mock", "<rootDir>/tests/helpers/mockUrl.js"]
1818
};

postcss.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
22
plugins: {
3-
autoprefixer: {},
4-
},
3+
autoprefixer: {}
4+
}
55
};

src/components/Plotly.vue

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ export default {
1717
directives,
1818
props: {
1919
data: {
20-
type: Array,
20+
type: Array
2121
},
2222
layout: {
23-
type: Object,
23+
type: Object
2424
},
2525
id: {
2626
type: String,
2727
required: false,
28-
default: null,
29-
},
28+
default: null
29+
}
3030
},
3131
data() {
3232
return {
3333
scheduled: null,
34-
innerLayout: { ...this.layout },
34+
innerLayout: { ...this.layout }
3535
};
3636
},
3737
mounted() {
@@ -45,7 +45,7 @@ export default {
4545
handler() {
4646
this.schedule({ replot: true });
4747
},
48-
deep: true,
48+
deep: true
4949
},
5050
options: {
5151
handler(value, old) {
@@ -54,12 +54,12 @@ export default {
5454
}
5555
this.schedule({ replot: true });
5656
},
57-
deep: true,
57+
deep: true
5858
},
5959
layout(layout) {
6060
this.innerLayout = { ...layout };
6161
this.schedule({ replot: false });
62-
},
62+
}
6363
},
6464
computed: {
6565
options() {
@@ -69,9 +69,9 @@ export default {
6969
}, {});
7070
return {
7171
responsive: false, // default
72-
...optionsFromAttrs, // overrides if specified
72+
...optionsFromAttrs // overrides if specified
7373
};
74-
},
74+
}
7575
},
7676
beforeDestroy() {
7777
events.forEach(event => this.$el.removeAllListeners(event.completeName));
@@ -91,7 +91,7 @@ export default {
9191
this.scheduled = context;
9292
this.$nextTick(() => {
9393
const {
94-
scheduled: { replot },
94+
scheduled: { replot }
9595
} = this;
9696
this.scheduled = null;
9797
if (replot) {
@@ -115,12 +115,12 @@ export default {
115115
return {
116116
format: "png",
117117
width: $el.clientWidth,
118-
height: $el.clientHeight,
118+
height: $el.clientHeight
119119
};
120120
},
121121
react() {
122122
Plotly.react(this.$el, this.data, this.innerLayout, this.options);
123-
},
124-
},
123+
}
124+
}
125125
};
126126
</script>

src/components/events.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const eventsName = [
2525
"SliderStart",
2626
"Transitioning",
2727
"TransitionInterrupted",
28-
"Unhover",
28+
"Unhover"
2929
];
3030

3131
const events = eventsName
@@ -34,7 +34,7 @@ const events = eventsName
3434
completeName: "plotly_" + eventName,
3535
handler: context => (...args) => {
3636
context.$emit.apply(context, [eventName, ...args]);
37-
},
37+
}
3838
}));
3939

4040
export default events;

tests/.eslintrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
22
env: {
3-
jest: true,
4-
},
3+
jest: true
4+
}
55
};

tests/mocks/plotly.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default {
22
Plots: {
3-
resize: jest.fn(),
3+
resize: jest.fn()
44
},
55
plot: jest.fn(),
66
newPlot: jest.fn(element => {
@@ -18,5 +18,5 @@ export default {
1818
extendTraces: jest.fn(),
1919
prependTraces: jest.fn(),
2020
toImage: jest.fn(),
21-
downloadImage: jest.fn(),
21+
downloadImage: jest.fn()
2222
};

tests/unit/helper.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ describe("camelize", () => {
77
["kebab-case", "kebabCase"],
88
["multi-hyphen-string", "multiHyphenString"],
99
["drag-class", "dragClass"],
10-
["test-", "test-"],
10+
["test-", "test-"]
1111
])("transform %s into %s", (value, expected) => {
1212
const actual = camelize(value);
1313
expect(actual).toEqual(expected);

0 commit comments

Comments
 (0)