Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
chore(infra): met à jour toutes les dépendances npm (#1460)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBitard authored Sep 12, 2024
1 parent 9876549 commit 0192de3
Show file tree
Hide file tree
Showing 90 changed files with 6,401 additions and 10,710 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Install dependencies
run: make install
- name: Install Playwright
run: npx playwright@1.45.1 install --with-deps chromium
run: npx playwright@1.47.0 install --with-deps chromium
- name: Build Storybook
run: make storybook/build
- name: Serve Storybook and run tests
Expand Down
8 changes: 7 additions & 1 deletion knip.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const config = {
ignore: ['**/eslint.config.mjs'],
workspaces: {
".": {
ignoreBinaries: [
Expand Down Expand Up @@ -41,6 +42,8 @@ const config = {
"graphql-scalars",
"@vitest/coverage-v8",
"@pgtyped/cli",
"eslint-config-prettier",
"eslint-plugin-promise",
],
},
"packages/common": {
Expand All @@ -57,7 +60,10 @@ const config = {
"@vitest/coverage-v8",
"@babel/eslint-parser",
"@vue/eslint-config-prettier",
"@vue/eslint-config-standard",
"@typescript-eslint/eslint-plugin",
"@typescript-eslint/parser",
"eslint-config-prettier",
"eslint-plugin-promise",
"babel-core",
"babel-loader",
"babel-preset-vite",
Expand Down
16,019 changes: 5,855 additions & 10,164 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@
},
"lint-staged": {
"packages/ui/src/**/*.{js,ts,tsx}": [
"eslint --cache --fix --max-warnings=0",
"eslint --config packages/ui/eslint.config.mjs --cache --fix --max-warnings=0",
"prettier --write"
],
"packages/ui/**/*.css": "prettier --write",
"packages/api/**/*.{js,ts}": [
"eslint --cache --fix --max-warnings=0",
"eslint --config packages/api/eslint.config.mjs --cache --fix --max-warnings=0",
"prettier --write"
],
"packages/api/**/*.{graphql,md}": "prettier --write",
"packages/common/src/**/*.ts": [
"eslint --cache --fix --max-warnings=0",
"eslint --config packages/common/eslint.config.mjs --cache --fix --max-warnings=0",
"prettier --write"
],
"packages/ui/src/components/_ui/iconSprite.tsx": [
Expand All @@ -50,10 +50,10 @@
},
"devDependencies": {
"@types/react": "file:stub/types__react",
"husky": "^9.1.5",
"lint-staged": "^15.2.2",
"semantic-release": "^23.0.8",
"semantic-release-mattermost": "^1.2.1",
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"semantic-release": "^24.1.1",
"semantic-release-mattermost": "^1.2.2",
"typescript": "^5.6.2",
"vue": "^3.5.4"
},
Expand Down
9 changes: 0 additions & 9 deletions packages/api/.eslintignore

This file was deleted.

126 changes: 126 additions & 0 deletions packages/api/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
import typescriptEslint from '@typescript-eslint/eslint-plugin'
import sql from 'eslint-plugin-sql'
import globals from 'globals'
import tsParser from '@typescript-eslint/parser'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import js from '@eslint/js'
import { FlatCompat } from '@eslint/eslintrc'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
})

export default [
{
ignores: ['*.mjs', 'api-cache', 'backups', 'coverage', 'dist', 'docs', 'files', 'node_modules', 'sources', '**/*.queries.types.ts'],
},
...compat.extends('eslint:recommended', 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', 'prettier'),
{
plugins: {
'@typescript-eslint': typescriptEslint,
sql,
},

languageOptions: {
globals: {
...globals.node,
GeoJSON: 'readonly',
},

parser: tsParser,
ecmaVersion: 5,
sourceType: 'commonjs',

parserOptions: {
project: true,
},
},

rules: {
camelcase: 0,

'sql/format': [
0,
{
ignoreExpressions: false,
ignoreInline: true,
ignoreTagless: true,
},
],

'sql/no-unsafe-query': [
2,
{
allowLiteral: false,
},
],

'newline-before-return': 1,
'no-use-before-define': 0,
'no-redeclare': 0,
'no-return-await': 'error',
'default-param-last': 0,
'no-unused-vars': 0,

'no-restricted-syntax': 0,

'no-console': [
'error',
{
allow: ['debug', 'info', 'warn', 'error', 'time', 'timeEnd'],
},
],

'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/explicit-module-boundary-types': 'warn',
'@typescript-eslint/no-empty-interface': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/ban-ts-comment': 0,

'@typescript-eslint/no-unused-vars': 0, // on utilise typescript noUnusedLocals et noUnusedParameters à la place

'@typescript-eslint/strict-boolean-expressions': 'error',
'@typescript-eslint/no-empty-object-type': 0,
},
},
{
files: ['**/src/database/models/*.ts'],

rules: {
'@typescript-eslint/no-unsafe-declaration-merging': 'off',
},
},
{
files: ['src/**/*.ts'],
ignores: ['**/src/**/*.queries.ts', '**/src/pg-database.ts'],

rules: {
'no-restricted-syntax': [
'error',
{
message: 'dbQueryAndValidate is to be used only in .queries.ts files',
selector: "CallExpression[callee.name='dbQueryAndValidate']",
},
{
message: 'leftJoinRelation is deprecated. Use leftJoinRelated instead.',
selector: "Identifier[name='leftJoinRelation']",
},
{
message: 'sort is deprecated. Use toSorted instead.',
selector: "Identifier[name='sort']",
},
{
message: "no 'run' call from PgTyped allowed. Use dbQueryAndValidate.",
selector: "CallExpression[callee.property.name='run'][arguments.length=2]",
},
],
},
},
]
Loading

0 comments on commit 0192de3

Please sign in to comment.