Skip to content

Commit

Permalink
[TECH] Utiliser le système de module ESM (PIX-7202)
Browse files Browse the repository at this point in the history
  • Loading branch information
pix-service-auto-merge committed May 22, 2023
2 parents 97fb3a7 + 99b638f commit d038ad3
Show file tree
Hide file tree
Showing 3,426 changed files with 35,749 additions and 40,088 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 0 additions & 2 deletions api/.codemodsignore

This file was deleted.

21 changes: 20 additions & 1 deletion api/.depcheckrc
@@ -1,12 +1,20 @@
ignores:
[
'@babel/plugin-syntax-import-assertions',
'bookshelf-validate',
'mocha-junit-reporter',
'eslint-plugin-mocha',
'eslint-plugin-yml',
'hapi-swagger',
'hapi-sentry',
'jscodeshift',
'mocha-junit-reporter',
'pg-connection-string',
'pino-pretty',
]

# @babel/plugin-syntax-import-assertions is used by eslint
# see https://github.com/babel/babel/blob/main/packages/babel-plugin-syntax-import-assertions/README.md

# "bookshelf-validate" is used in ./lib/infrastructure/bookshelf.js
# code => bookshelf.plugin('bookshelf-validate',
# see https://github.com/kripod/bookshelf-validate#configuration
Expand All @@ -23,6 +31,17 @@ ignores:
# code => plugins: - yaml
# see https://github.com/ota-meshi/eslint-plugin-yml#book-usage

# "hapi-sentry" is used in ./lib/infrastructure/plugins/sentry.js
# see https://github.com/hydra-newmedia/hapi-sentry

# "hapi-swagger" is used in ./lib/application/authentication/index.js
# see https://github.com/hapi-swagger/hapi-swagger

# @babel/plugin-syntax-import-assertions is used by eslint
# see https://github.com/babel/babel/blob/main/packages/babel-plugin-syntax-import-assertions/README.md

# "pino-pretty" is used in ../lib/infrastructure/logger.js
# code => target: 'pino-pretty'
# see https://github.com/pinojs/pino-pretty#programmatic-integration

# "pg-connection-string" is used in api/tests/acceptance/database/configuration.cjs
2 changes: 1 addition & 1 deletion api/.eslintignore
@@ -1,4 +1,4 @@
# https://eslint.org/docs/user-guide/configuring#eslintignore
# .file are implicitly ignored, unless explicitly specified here
node_modules/
codemods/
nyc.config.js
22 changes: 21 additions & 1 deletion api/.eslintrc.yaml
Expand Up @@ -4,11 +4,18 @@ extends:
- 'plugin:mocha/recommended'
- 'plugin:prettier/recommended'
- 'plugin:chai-expect/recommended'
- 'plugin:node/recommended-module'
- 'plugin:import/recommended'

parserOptions:
ecmaVersion: 2020
requireConfigFile: false
babelOptions:
parserOpts:
plugins:
- importAssertions

parser: "@babel/eslint-parser"
parser: '@babel/eslint-parser'

globals:
include: true
Expand Down Expand Up @@ -41,3 +48,16 @@ rules:
# Refer to scripts/_template.js for reliable alternatives to process.exit()
node/no-process-exit: error
unicorn/no-empty-file: error
node/no-unpublished-import:
- error
- allowModules:
- chai
- flush-write-stream
- form-data
- mockdate
- nock
- proxyquire
- sinon
- split2
- stream-to-promise
- pino-pretty

0 comments on commit d038ad3

Please sign in to comment.