Skip to content

Commit

Permalink
Automatic update to new version.
Browse files Browse the repository at this point in the history
  • Loading branch information
thaibault committed Sep 29, 2024
1 parent 06e7e16 commit 9d3b2b1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
4 changes: 3 additions & 1 deletion eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import typescriptPlugin from '@stylistic/eslint-plugin-ts'
export default typescript.config(
{
extends: [
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
eslintjs.configs.recommended,
...typescript.configs.strictTypeChecked,
...typescript.configs.strict,
Expand All @@ -14,6 +15,7 @@ export default typescript.config(
files: ['*.ts'],
languageOptions: {
ecmaVersion: 'latest',
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
parser: typescriptParser,
parserOptions: {
impliedStrict: true,
Expand All @@ -30,6 +32,6 @@ export default typescript.config(
}
},
{
ignores: ["*.js"]
ignores: ['*.mjs', '*.js']
}
)
6 changes: 4 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ export const requestHandler = async (
// region build feature options
const featureOptions: Mapping<{ flags: Array<Flag> }> = {}
for (const feature of features) {
const configuration: [string, ...Array<Flag>] =
const configuration =
feature.split('|') as [string, ...Array<Flag>]

featureOptions[configuration[0]] = {
const option = configuration[0]

featureOptions[option] = {
flags: configuration.length > 1 ?
configuration[1] as unknown as Array<Flag> :
flags
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"scripts": {
"build": "yarn build:types; yarn build:plain",
"build:lint": "babel --plugins @babel/plugin-transform-runtime --presets @babel/preset-env,@babel/preset-typescript --source-maps inline --out-file eslint.config.js eslint.config.ts",
"build:lint": "babel --presets @babel/preset-typescript --source-maps inline --out-file eslint.config.mjs eslint.config.ts",
"build:plain": "babel --plugins @babel/plugin-transform-runtime --presets @babel/preset-env,@babel/preset-typescript --source-maps inline --out-file index.js index.ts && sed --in-place --regexp-extended 's:^// *(#![^ ]+ ).*$:\\1node:' index.js && chmod +x index.js",
"build:types": "tsc --emitDeclarationOnly",
"check:types": "tsc --noEmit",
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
"declaration": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"lib": ["ESNext"],
"lib": ["DOM", "ESNext"],
"module": "esnext",
"moduleResolution": "nodenext",
"moduleResolution": "node",
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
Expand Down

0 comments on commit 9d3b2b1

Please sign in to comment.