Skip to content

Commit

Permalink
Implement rule to standardise array style
Browse files Browse the repository at this point in the history
  • Loading branch information
sopa301 committed Jan 20, 2024
1 parent 80c182d commit db84b54
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 23 deletions.
32 changes: 13 additions & 19 deletions frontend/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,19 @@
"plugin:import/typescript"
],
"rules": {
"vue/component-definition-name-casing": [
"error",
"kebab-case"
],
"vue/component-definition-name-casing": ["error", "kebab-case"],
"vue/require-prop-types": 0,
"no-param-reassign": 0,
"arrow-parens": [
"error",
"always"
],
"arrow-parens": ["error", "always"],
"indent": [
"error",
2,
{
"ignoredNodes": [
"ConditionalExpression"
]
"ignoredNodes": ["ConditionalExpression"]
}
],
"prefer-destructuring": 0,
"func-names": [
"error",
"as-needed"
],
"func-names": ["error", "as-needed"],
"no-alert": 0,
"linebreak-style": 0,
"max-len": [
Expand Down Expand Up @@ -71,14 +60,19 @@
"error",
2,
{
"ignoredNodes": [
"ConditionalExpression"
],
"ignoredNodes": ["ConditionalExpression"],
"SwitchCase": 0
}
],
"@typescript-eslint/member-delimiter-style": "error",
"@typescript-eslint/type-annotation-spacing": "error"
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/array-type": [
"error",
{
"default": "array-simple",
"readonly": "array-simple"
}
]
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
} from 'vue-router';
import Home from '../views/c-home.vue';

const routes: Array<RouteRecordRaw> = [
const routes: RouteRecordRaw[] = [
{
path: '/',
component: Home,
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/utils/segment.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export default class Segment {
knownAuthor: string | null;

lineNumbers: Array<number>;
lineNumbers: number[];

lines: Array<string>;
lines: string[];

constructor(knownAuthor: string | null, lineNumbers: Array<number>, lines: Array<string>) {
constructor(knownAuthor: string | null, lineNumbers: number[], lines: string[]) {
this.knownAuthor = knownAuthor;
this.lineNumbers = lineNumbers;
this.lines = lines;
Expand Down

0 comments on commit db84b54

Please sign in to comment.