Skip to content

Commit a6eb814

Browse files
Ivan-ShamlBrutus5000
authored andcommitted
Fix eslinter action
* run linter on the project
1 parent 8e9ebab commit a6eb814

File tree

8 files changed

+142
-108
lines changed

8 files changed

+142
-108
lines changed

.eslintrc

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

eslint.config.mjs

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import { defineConfig } from 'eslint/config'
2+
import prettier from 'eslint-plugin-prettier'
3+
import globals from 'globals'
4+
import path from 'node:path'
5+
import { fileURLToPath } from 'node:url'
6+
import js from '@eslint/js'
7+
import { FlatCompat } from '@eslint/eslintrc'
8+
9+
const __filename = fileURLToPath(import.meta.url)
10+
const __dirname = path.dirname(__filename)
11+
const compat = new FlatCompat({
12+
baseDirectory: __dirname,
13+
recommendedConfig: js.configs.recommended,
14+
allConfig: js.configs.all,
15+
})
16+
17+
export default defineConfig([
18+
{
19+
extends: compat.extends('standard', 'plugin:prettier/recommended'),
20+
21+
plugins: {
22+
prettier,
23+
},
24+
25+
rules: {
26+
'prettier/prettier': 'error',
27+
},
28+
},
29+
{
30+
files: ['src/frontend/**/*.js'],
31+
32+
languageOptions: {
33+
globals: {
34+
...globals.browser,
35+
},
36+
},
37+
},
38+
{
39+
files: ['src/backend/**/*.js'],
40+
41+
languageOptions: {
42+
globals: {
43+
...globals.node,
44+
},
45+
},
46+
},
47+
{
48+
files: ['tests/**/*.js'],
49+
50+
languageOptions: {
51+
globals: {
52+
...globals.node,
53+
...globals.jest,
54+
...globals.jasmine,
55+
},
56+
},
57+
},
58+
])

package.json

Lines changed: 73 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,75 @@
11
{
2-
"name": "website",
3-
"version": "2.0.0",
4-
"private": true,
5-
"dependencies": {
6-
"axios": "1.10.0",
7-
"body-parser": "2.2.0",
8-
"client-oauth2": "4.3.3",
9-
"connect-flash": "^0.1.1",
10-
"dotenv": "17.0.0",
11-
"express": "^5.1.0",
12-
"express-session": "^1.18.1",
13-
"express-validator": "7.2.1",
14-
"moment": "^2.30.1",
15-
"node-cache": "^5.1.2",
16-
"node-dependency-injection": "^3.2.2",
17-
"node-fetch": "^3.3.2",
18-
"npm-check": "^6.0.1",
19-
"passport": "^0.7.0",
20-
"passport-oauth2-refresh": "^2.2.0",
21-
"passport-openidconnect": "^0.1.2",
22-
"pug": "3.0.3",
23-
"request": "2.88.2",
24-
"sass": "^1.89.2",
25-
"session-file-store": "^1.5.0",
26-
"showdown": "^2.1.0",
27-
"simple-datatables": "^10.0.0",
28-
"simple-oauth2": "^5.1.0",
29-
"supertest-session": "^5.0.1",
30-
"url-slug": "^4.0.1"
31-
},
32-
"devDependencies": {
33-
"@prettier/plugin-pug": "^3.4.0",
34-
"awesomplete": "^1.1.7",
35-
"css-loader": "^7.1.2",
36-
"eslint": "^9.30.0",
37-
"eslint-config-prettier": "^10.1.5",
38-
"eslint-config-standard": "^17.1.0",
39-
"eslint-plugin-import": "^2.32.0",
40-
"eslint-plugin-n": "^17.20.0",
41-
"eslint-plugin-prettier": "^5.5.1",
42-
"eslint-plugin-promise": "^7.2.1",
43-
"grunt": "1.6.1",
44-
"grunt-concurrent": "3.0.0",
45-
"grunt-contrib-watch": "^1.1.0",
46-
"grunt-nodemon": "^0.4.2",
47-
"grunt-postcss": "0.9.0",
48-
"grunt-run": "^0.8.1",
49-
"grunt-sass": "4.0.0",
50-
"highcharts": "^12.3.0",
51-
"jest": "^30.0.3",
52-
"load-grunt-config": "4.0.1",
53-
"load-grunt-tasks": "5.1.0",
54-
"nock": "^14.0.5",
55-
"octokit": "^5.0.3",
56-
"prettier": "^3.6.2",
57-
"style-loader": "^4.0.0",
58-
"supertest": "^7.1.1",
59-
"typescript": "^5.8.3",
60-
"webpack": "^5.99.9",
61-
"webpack-cli": "^6.0.1",
62-
"webpack-manifest-plugin": "^5.0.1"
63-
},
64-
"engines": {
65-
"node": ">=22.0.0",
66-
"yarn": ">=1.22.0"
67-
},
68-
"scripts": {
69-
"test": "jest",
70-
"lint": "eslint --ignore-path .gitignore src tests && prettier --check **/*.pug",
71-
"lint:fix": "eslint --fix --ignore-path .gitignore src tests && prettier --write **/*.pug"
72-
}
2+
"name": "website",
3+
"version": "2.0.0",
4+
"private": true,
5+
"dependencies": {
6+
"axios": "1.10.0",
7+
"body-parser": "2.2.0",
8+
"client-oauth2": "4.3.3",
9+
"connect-flash": "^0.1.1",
10+
"dotenv": "17.0.0",
11+
"express": "^5.1.0",
12+
"express-session": "^1.18.1",
13+
"express-validator": "7.2.1",
14+
"moment": "^2.30.1",
15+
"node-cache": "^5.1.2",
16+
"node-dependency-injection": "^3.2.2",
17+
"node-fetch": "^3.3.2",
18+
"npm-check": "^6.0.1",
19+
"passport": "^0.7.0",
20+
"passport-oauth2-refresh": "^2.2.0",
21+
"passport-openidconnect": "^0.1.2",
22+
"pug": "3.0.3",
23+
"request": "2.88.2",
24+
"sass": "^1.89.2",
25+
"session-file-store": "^1.5.0",
26+
"showdown": "^2.1.0",
27+
"simple-datatables": "^10.0.0",
28+
"simple-oauth2": "^5.1.0",
29+
"supertest-session": "^5.0.1",
30+
"url-slug": "^4.0.1"
31+
},
32+
"devDependencies": {
33+
"@prettier/plugin-pug": "^3.4.0",
34+
"@eslint/eslintrc": "^3.3.1",
35+
"@eslint/js": "^9.31.0",
36+
"awesomplete": "^1.1.7",
37+
"css-loader": "^7.1.2",
38+
"eslint": "^9.30.0",
39+
"eslint-config-prettier": "^10.1.5",
40+
"eslint-config-standard": "^17.1.0",
41+
"eslint-plugin-import": "^2.32.0",
42+
"eslint-plugin-n": "^17.20.0",
43+
"eslint-plugin-prettier": "^5.5.1",
44+
"eslint-plugin-promise": "^7.2.1",
45+
"grunt": "1.6.1",
46+
"grunt-concurrent": "3.0.0",
47+
"grunt-contrib-watch": "^1.1.0",
48+
"grunt-nodemon": "^0.4.2",
49+
"grunt-postcss": "0.9.0",
50+
"grunt-run": "^0.8.1",
51+
"grunt-sass": "4.0.0",
52+
"highcharts": "^12.3.0",
53+
"jest": "^30.0.3",
54+
"load-grunt-config": "4.0.1",
55+
"load-grunt-tasks": "5.1.0",
56+
"nock": "^14.0.5",
57+
"octokit": "^5.0.3",
58+
"prettier": "^3.6.2",
59+
"style-loader": "^4.0.0",
60+
"supertest": "^7.1.1",
61+
"typescript": "^5.8.3",
62+
"webpack": "^5.99.9",
63+
"webpack-cli": "^6.0.1",
64+
"webpack-manifest-plugin": "^5.0.1"
65+
},
66+
"engines": {
67+
"node": ">=22.0.0",
68+
"yarn": ">=1.22.0"
69+
},
70+
"scripts": {
71+
"test": "jest",
72+
"lint": "eslint src tests && prettier --check **/*.pug",
73+
"lint:fix": "eslint --fix src tests && prettier --write **/*.pug"
74+
}
7375
}

src/backend/routes/views/clanRouter.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ router.get(
4646
middlewares.isAuthenticated(),
4747
require('./clans/inviteAccept')
4848
)
49-
router.all('*splat', (req, res) => res.status(503).render('errors/503-known-issue'))
49+
router.all('*splat', (req, res) =>
50+
res.status(503).render('errors/503-known-issue')
51+
)
5052

5153
module.exports = router

src/backend/templates/mixins/flash-error.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mixin flash-error(validationErrors)
2-
if validationErrors && validationErrors.messages
2+
if validationErrors && validationErrors.messages
33
.alert(class=validationErrors.class)
44
ul.validationErrors-errors
55
each error in validationErrors.messages.errors

src/backend/templates/mixins/form/account.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ mixin usernameOrEmail
4949
)
5050
span(aria-hidden='true')
5151

52-
mixin confirm-password(passwordName,labelPassword)
52+
mixin confirm-password(passwordName, labelPassword)
5353
- passwordName = passwordName || 'password'
5454
- labelPassword = labelPassword || ''
5555
.form-group.has-feedback

src/backend/templates/views/account/changePassword.pug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ block content
2121
data-toggle='validator'
2222
)
2323
+oldPassword('Old')
24-
+confirm-password('','New')
24+
+confirm-password('', 'New')
2525
.form-actions
2626
button.btn.btn-default.btn-lg.btn-outro.btn-danger(
2727
type='submit'

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,11 @@
372372
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.30.0.tgz#c396fa450d5505dd9b7b8846b33f0491aebd9a2d"
373373
integrity sha512-Wzw3wQwPvc9sHM+NjakWTcPx11mbZyiYHuwWa/QfZ7cIRX7WK54PSk7bdyXDaoaopUcMatv1zaQvOAAO8hCdww==
374374

375+
"@eslint/js@^9.31.0":
376+
version "9.31.0"
377+
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.31.0.tgz#adb1f39953d8c475c4384b67b67541b0d7206ed8"
378+
integrity sha512-LOm5OVt7D4qiKCqoiPbA7LWmI+tbw1VbTUowBcUMgQSuM6poJufkFkYDcQpo5KfgD39TnNySV26QjOh7VFpSyw==
379+
375380
"@eslint/object-schema@^2.1.6":
376381
version "2.1.6"
377382
resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.6.tgz#58369ab5b5b3ca117880c0f6c0b0f32f6950f24f"

0 commit comments

Comments
 (0)