Skip to content

Commit

Permalink
Merge pull request #564 from correctexam/563-migrate-to-the-last-angu…
Browse files Browse the repository at this point in the history
…lar-182-to-support-isolated-module

563 migrate to the last angular 182 to support isolated module
  • Loading branch information
barais authored Oct 15, 2024
2 parents 08467d8 + 4b03fce commit 93e75e6
Show file tree
Hide file tree
Showing 138 changed files with 20,224 additions and 19,930 deletions.
9 changes: 0 additions & 9 deletions .eslintignore

This file was deleted.

101 changes: 0 additions & 101 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/cloudfare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

strategy:
matrix:
node-version: [20.x]
node-version: [22.x]

steps:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/netlify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

strategy:
matrix:
node-version: [20.x]
node-version: [22.x]

steps:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

strategy:
matrix:
node-version: [20.x]
node-version: [22.x]

steps:

Expand Down
4 changes: 0 additions & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"


npx --no-install lint-staged
2 changes: 1 addition & 1 deletion __mocks__/exportCsvMock.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
const mkConfig = () => {}
module.exports = {
mkConfig
Expand Down
21 changes: 18 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,16 @@
"output": "swagger-ui",
"ignore": ["**/index.html"]
},
{ "glob": "axios.min.js", "input": "./node_modules/axios/dist", "output": "swagger-ui" },
{ "glob": "**/*", "input": "src/main/webapp/swagger-ui/", "output": "swagger-ui" }
{
"glob": "axios.min.js",
"input": "./node_modules/axios/dist",
"output": "swagger-ui"
},
{
"glob": "**/*",
"input": "src/main/webapp/swagger-ui/",
"output": "swagger-ui"
}
],
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
Expand Down Expand Up @@ -150,6 +158,12 @@
},
"deploy": {
"builder": "angular-cli-ghpages:deploy"
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": ["src/main/webapp/**/*.ts", "src/main/webapp/**/*.html"]
}
}
}
}
Expand All @@ -161,6 +175,7 @@
"environment": "all"
},
"packageManager": "npm",
"analytics": false
"analytics": false,
"schematicCollections": ["@angular-eslint/schematics"]
}
}
6 changes: 3 additions & 3 deletions cypress/e2e/Step6_voirResultat.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe("Step 6: Voir résultat", () => {
cy.wait(200)

cy.get("tr:nth-of-type(1) > td:nth-of-type(5)").should(
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
(el) =>
{
const t =el.text()
Expand All @@ -43,7 +43,7 @@ describe("Step 6: Voir résultat", () => {
)

cy.get("tr:nth-of-type(2) > td:nth-of-type(5)").should(
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
(el) =>
{
const t =el.text()
Expand All @@ -58,7 +58,7 @@ describe("Step 6: Voir résultat", () => {
)

cy.get("tr:nth-of-type(3) > td:nth-of-type(5)").should(
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
(el) =>
{
const t =el.text()
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/commands.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable spaced-comment */
/// <reference types="cypress" />
// ***********************************************
// This example commands.ts shows you how to
Expand Down
77 changes: 77 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default [
{
ignores: [
'node_modules',
'src/main/docker',
'src/main/webapp/content/**',
'jest.conf.js',
'webpack/*',
'target',
'build',
'node',
'postcss.config.js',
'__mocks__/styleMock.js',
'__mocks__/exportCsvMock.js',
'cypress/e2e/test.js',
'.lintstagedrc.js',
],
},
eslint.configs.recommended,
...tseslint.configs.recommended,
{
files: ['src/**/*.ts'],

rules: {
'@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true }],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/member-ordering': [
'error',
{
default: [
'public-static-field',
'protected-static-field',
'private-static-field',
'public-instance-field',
'protected-instance-field',
'private-instance-field',
'constructor',
'public-static-method',
'protected-static-method',
'private-static-method',
'public-instance-method',
'protected-instance-method',
'private-instance-method',
],
},
],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-parameter-properties': 'off',
'@typescript-eslint/no-shadow': ['error'],
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/prefer-promise-reject-errors': 'off',
'arrow-body-style': 'error',
curly: 'error',
eqeqeq: ['error', 'always', { null: 'ignore' }],
'guard-for-in': 'error',
'no-bitwise': 'error',
'no-caller': 'error',
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-eval': 'error',
'no-labels': 'error',
'no-new': 'error',
'no-new-wrappers': 'error',
'object-shorthand': ['error', 'always', { avoidExplicitReturnArrows: true }],
radix: 'error',
'spaced-comment': ['warn', 'always'],
},
},
];
Loading

0 comments on commit 93e75e6

Please sign in to comment.