Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ESLint linting and other refactoring #29

Merged
merged 76 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
6278f22
add CI and ESLint config (and change some configs)
Dyskal Oct 19, 2023
6de1766
first batch of fixes
Dyskal Oct 23, 2023
3549070
clearing partner
ShiroUsagi-san Oct 23, 2023
7379b1f
Lint some views and components
KwikKill Oct 23, 2023
6d84a05
second batch of linting
Dyskal Oct 23, 2023
cfd4714
adding onMounted for api calls
ShiroUsagi-san Oct 23, 2023
a6c590d
fixing typo
ShiroUsagi-san Oct 23, 2023
2c5472f
Fix footer and lint Me.vue
KwikKill Oct 23, 2023
4fdf7cd
move style to correct location
Dyskal Oct 23, 2023
f55bd2a
Lint Tournaments views
KwikKill Oct 24, 2023
6c4390e
TeamCard and Toast components linted
TheBloodMan49 Oct 24, 2023
be90c78
cleaning more files and adding trailer embed
ShiroUsagi-san Oct 25, 2023
62ed343
lint Footer.vue
istar410 Oct 25, 2023
5d1eb41
partial clean of LoginForm.vue
istar410 Oct 25, 2023
738cd24
partial clean Navigation.vue
istar410 Oct 25, 2023
18fd910
partial clean PasswordResetForm.vue
istar410 Oct 25, 2023
9c735f3
partial clean FormField.vue
istar410 Oct 25, 2023
e3414c6
partial clean RegisterForm.vue
istar410 Oct 25, 2023
188459d
lint TeamCard.vue
istar410 Oct 25, 2023
a36bf53
lint Toast.vue
istar410 Oct 25, 2023
dc956a0
lint TournamentCard.vue
istar410 Oct 25, 2023
de5bcc2
fix prop type in TournamentCard.vue
istar410 Oct 25, 2023
50b8628
fix tournament prop in TournamentCard.vue
istar410 Oct 25, 2023
6a0a671
Linted Partners.vue and almost all of PasswordReset and RegisterForm
TheBloodMan49 Oct 25, 2023
2dd9848
fix typo
istar410 Oct 25, 2023
31d9383
adding content fetch through a store
ShiroUsagi-san Oct 16, 2023
bedeec1
cms
floflo0 Oct 25, 2023
7f0b510
adding content cms and more linting!
ShiroUsagi-san Oct 25, 2023
f06c398
fixing linting
ShiroUsagi-san Oct 25, 2023
c312ac8
lint tournament store
istar410 Oct 27, 2023
1674edb
finish linting TournamentRegister
istar410 Oct 27, 2023
ef20913
fix minor issues in Navigation
istar410 Oct 27, 2023
e302f94
moar linting
ShiroUsagi-san Oct 28, 2023
fa1d467
finish linting TournamentDetail
istar410 Oct 28, 2023
febfc83
move markdown dependencies from dev
istar410 Oct 28, 2023
4ed1703
minor fixes
istar410 Oct 28, 2023
25812c2
fix minor issues
istar410 Oct 28, 2023
5d4336c
moar linting
ShiroUsagi-san Oct 28, 2023
daff5b6
fix tournament image ratio and change 'rules' link to 'more info' link
istar410 Oct 15, 2023
b77e03e
simplify tournament card style
istar410 Oct 15, 2023
c1e22f1
add $reset function to tournament store
istar410 Oct 16, 2023
1adcd99
refactor tournament view on home page
istar410 Oct 16, 2023
e0fd630
fix home page section overlap on some screen sizes
istar410 Oct 17, 2023
3d8247b
responsive tab navigation system
istar410 Oct 17, 2023
1816622
fix some ts types
istar410 Oct 17, 2023
fff0a9e
redesign tournament register vue
istar410 Oct 26, 2023
d0ed4b9
cleanup code, remove custom css and vanilla js
istar410 Oct 26, 2023
122da0a
cleanup code for TournamentDetail
istar410 Oct 26, 2023
896d4cc
fix linting in TournamentDetail
istar410 Oct 28, 2023
7b7e603
fix linting TournamentRegister
istar410 Oct 28, 2023
bf1122c
fix tournamentCard and Home
istar410 Oct 28, 2023
2dd0af5
fix package.json and missing package-lock
istar410 Oct 28, 2023
50d7789
partial fix FormField linting
istar410 Oct 28, 2023
1441b0b
fix form layout
istar410 Oct 28, 2023
ce1b1b0
fix login form labels position
istar410 Oct 28, 2023
5bce9c8
fix tailwind form style
istar410 Oct 28, 2023
306523b
adding linting and types reflect more the backend API
ShiroUsagi-san Oct 29, 2023
ea9d777
fix typing patch_user errors
istar410 Oct 29, 2023
f97eba3
tournamentDetail menu style and animation
istar410 Oct 30, 2023
9e82b19
end of linting and correct some typescript errors
Dyskal Oct 30, 2023
7d47453
fixing typo
ShiroUsagi-san Oct 30, 2023
a855078
update TournamentRegister form validation
istar410 Oct 30, 2023
779ca72
minor fixes TournamentDetail
istar410 Oct 30, 2023
354ce7f
fix formating
istar410 Oct 30, 2023
ddae753
fix typo
istar410 Oct 30, 2023
de28cec
fix models
Dyskal Oct 30, 2023
8bd2faa
Fix type for user registration in Me view
KwikKill Oct 30, 2023
ee75d0c
adding Map component
ShiroUsagi-san Oct 30, 2023
25e57d3
cleaning code
ShiroUsagi-san Oct 30, 2023
eaa8084
remove assets/style.css
ShiroUsagi-san Oct 30, 2023
77321b1
adding nesting css
ShiroUsagi-san Oct 31, 2023
dd38812
refactor tournament.store
istar410 Oct 30, 2023
f694962
fix eslint errors
istar410 Oct 30, 2023
db0e51b
fix last issues
istar410 Oct 31, 2023
bf6bfe9
fix eslint errors
istar410 Oct 31, 2023
0be27d1
Merge pull request #41 from InsaLan/tournament-refactor
istar410 Oct 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
99 changes: 99 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
// @ts-check
const { defineConfig } = require('eslint-define-config');
require('@rushstack/eslint-patch/modern-module-resolution');

module.exports = defineConfig({
root: true,
env: {
browser: true,
node: true,
es2022: true,
},
overrides: [
{
files: ['*.vue', '*.ts'],
extends: [
'plugin:tailwindcss/recommended',
'plugin:vue/vue3-recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'@vue/eslint-config-airbnb-with-typescript',
],
plugins: [
'simple-import-sort',
],
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 'latest',
},
rules: {
// Eslint rules
'no-console': 'error',
'no-param-reassign': 'off',

// Plugins rules
'import/prefer-default-export': 'off',
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'import/order': 'off',
'simple-import-sort/imports': ['error', {
groups: [
// Node.js builtins prefixed with `node:`.
// Packages, things that start with a letter (or digit or underscore), or `@` followed by a letter.
// Absolute imports and other imports such as Vue-style `@/foo`.
// Anything not matched in another group.
['^node:', '^@?\\w', '^'],
// Relative imports.
// Anything that starts with a dot.
['^\\.'],
// Side effect imports.
['^\\u0000'],
],
}],
'simple-import-sort/exports': 'error',
'tailwindcss/no-custom-classname': 'off',

// TypeScript rules
// https://typescript-eslint.io/rules/#extension-rules
'@typescript-eslint/array-type': ['error', {
default: 'array',
}],
'@typescript-eslint/ban-types': 'error',
'@typescript-eslint/consistent-type-imports': ['error', {
fixStyle: 'inline-type-imports',
}],
'@typescript-eslint/member-delimiter-style': 'error',
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-import-type-side-effects': 'error',

// Vue rules
'vue/max-len': ['error', 120, 2, {
ignoreUrls: true,
ignoreComments: false,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreHTMLAttributeValues: true,
ignoreHTMLTextContents: false,
}],
'vue/multi-word-component-names': 'off',
'vue/html-closing-bracket-spacing': ['error', {
startTag: 'never',
endTag: 'never',
selfClosingTag: 'never',
}],
},
},
{
files: ['*.*js'],
extends: [
'@vue/eslint-config-airbnb',
],
rules: {
'global-require': 'off',
'vue/max-len': ['error', 120],
},
},
],
});
22 changes: 22 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 'lts/*'

- name: Install modules
run: npm ci

- name: Save Code Linting Report JSON
run: npx eslint --output-file eslint_report.json --format json .
# Continue to the next step even if this fails
continue-on-error: true

- name: Annotate Code Linting Results
uses: ataylorme/eslint-annotate-action@v2
with:
markdown-report-on-step-summary: true
24 changes: 12 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/icon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Insalan</title>
</head>
<body>
<div id="app" class="flex flex-col min-h-screen">
</div>
<script type="module" src="/src/main.ts"></script>
</body>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="description" content="Insalan">
<title>Insalan</title>
<script type="module" src="/src/main.ts"></script>
<link rel="icon" type="image/svg+xml" href="/icon.svg"/>
</head>
<body>
<div id="app"></div>
</body>
</html>
Loading