Skip to content

Commit 726970f

Browse files
add prettier rules for myself
Signed-off-by: Arnav Gupta <[email protected]>
1 parent 10659c0 commit 726970f

19 files changed

+76
-69
lines changed

.eslintrc.js

Lines changed: 6 additions & 6 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
},
6-
extends: ["plugin:vue/essential", "@vue/prettier", "@vue/typescript"],
6+
extends: ['plugin:vue/essential', '@vue/prettier', '@vue/typescript'],
77
rules: {
8-
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
9-
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off"
8+
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
9+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
1010
},
1111
parserOptions: {
12-
parser: "typescript-eslint-parser"
13-
}
12+
parser: 'typescript-eslint-parser',
13+
},
1414
};

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all",
4+
"arrowParens": "always",
5+
"semi": true,
6+
"tabWidth": 2
7+
}

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/app"]
2+
presets: ['@vue/app'],
33
};

jest.config.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
module.exports = {
2-
moduleFileExtensions: ["js", "jsx", "json", "vue", "ts", "tsx"],
2+
moduleFileExtensions: ['js', 'jsx', 'json', 'vue', 'ts', 'tsx'],
33
transform: {
4-
"^.+\\.vue$": "vue-jest",
5-
".+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$":
6-
"jest-transform-stub",
7-
"^.+\\.tsx?$": "ts-jest"
4+
'^.+\\.vue$': 'vue-jest',
5+
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
6+
'jest-transform-stub',
7+
'^.+\\.tsx?$': 'ts-jest',
88
},
99
moduleNameMapper: {
10-
"^@/(.*)$": "<rootDir>/src/$1"
10+
'^@/(.*)$': '<rootDir>/src/$1',
1111
},
12-
snapshotSerializers: ["jest-serializer-vue"],
12+
snapshotSerializers: ['jest-serializer-vue'],
1313
testMatch: [
14-
"**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"
14+
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)',
1515
],
16-
testURL: "http://localhost/"
16+
testURL: 'http://localhost/',
1717
};

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/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<style>
1212
#app {
13-
font-family: "Avenir", Helvetica, Arial, sans-serif;
13+
font-family: 'Avenir', Helvetica, Arial, sans-serif;
1414
-webkit-font-smoothing: antialiased;
1515
-moz-osx-font-smoothing: grayscale;
1616
text-align: center;

src/components/HelloWorld.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
</template>
112112

113113
<script lang="ts">
114-
import { Component, Prop, Vue } from "vue-property-decorator";
114+
import { Component, Prop, Vue } from 'vue-property-decorator';
115115
116116
@Component
117117
export default class HelloWorld extends Vue {

src/main.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import Vue from "vue";
2-
import App from "./App.vue";
3-
import router from "./router";
4-
import store from "./store";
1+
import Vue from 'vue';
2+
import App from './App.vue';
3+
import router from './router';
4+
import store from './store';
55

66
Vue.config.productionTip = false;
77

88
new Vue({
99
router,
1010
store,
11-
render: h => h(App)
12-
}).$mount("#app");
11+
render: (h) => h(App),
12+
}).$mount('#app');

src/router.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
import Vue from "vue";
2-
import Router from "vue-router";
3-
import Home from "./views/Home.vue";
1+
import Vue from 'vue';
2+
import Router from 'vue-router';
3+
import Home from './views/Home.vue';
44

55
Vue.use(Router);
66

77
export default new Router({
88
routes: [
99
{
10-
path: "/",
11-
name: "home",
12-
component: Home
10+
path: '/',
11+
name: 'home',
12+
component: Home,
1313
},
1414
{
15-
path: "/about",
16-
name: "about",
15+
path: '/about',
16+
name: 'about',
1717
// route level code-splitting
1818
// this generates a separate chunk (about.[hash].js) for this route
1919
// which is lazy-loaded when the route is visited.
2020
component: () =>
21-
import(/* webpackChunkName: "about" */ "./views/About.vue")
22-
}
23-
]
21+
import(/* webpackChunkName: "about" */ './views/About.vue'),
22+
},
23+
],
2424
});

src/shims-tsx.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Vue, { VNode } from "vue";
1+
import Vue, { VNode } from 'vue';
22

33
declare global {
44
namespace JSX {

0 commit comments

Comments
 (0)