diff --git a/apps/config/.envrc b/apps/config/.envrc new file mode 100644 index 00000000..fd3dddda --- /dev/null +++ b/apps/config/.envrc @@ -0,0 +1,2 @@ +use flake $FLAKE#node +npm ci diff --git a/apps/config/eslint.config.ts b/apps/config/eslint.config.ts new file mode 100644 index 00000000..f6bb50a7 --- /dev/null +++ b/apps/config/eslint.config.ts @@ -0,0 +1,451 @@ +import eslint from '@eslint/js'; +import jsdoc from 'eslint-plugin-jsdoc'; +import stylistic from '@stylistic/eslint-plugin'; +import tseslint from 'typescript-eslint'; + + +export default tseslint.config({ + files: ['**/*.js', '**/*.ts'], + ignores: ['node_modules/**', 'types/**'], + + extends: [ + eslint.configs.recommended, + jsdoc.configs['flat/recommended-typescript'], + stylistic.configs['recommended-flat'], + ...tseslint.configs.recommended, + ...tseslint.configs.stylistic, + ], + + rules: { + // JSDoc settings + 'jsdoc/tag-lines': ['warn', 'any', { startLines: 1 }], + 'jsdoc/check-line-alignment': ['warn', 'always', { + tags: ['param', 'arg', 'argument', 'property', 'prop'], + }], + 'jsdoc/no-types': 'off', + + // Newer settings + '@typescript-eslint/no-extraneous-class': ['off'], + '@typescript-eslint/no-implied-eval': ['off'], + 'class-methods-use-this': 'off', + '@stylistic/no-multiple-empty-lines': 'off', + + // Pre-flat config + '@typescript-eslint/no-unused-vars': [ + 'error', + { + args: 'all', + argsIgnorePattern: '^_', + caughtErrors: 'all', + caughtErrorsIgnorePattern: '^_', + destructuredArrayIgnorePattern: '^_', + varsIgnorePattern: '^_', + ignoreRestSiblings: true, + }, + ], + + 'array-callback-return': [ + 'error', + { + allowImplicit: true, + checkForEach: true, + }, + ], + 'no-constructor-return': [ + 'error', + ], + 'no-unreachable-loop': [ + 'error', + { + ignore: [ + 'ForInStatement', + 'ForOfStatement', + ], + }, + ], + 'no-use-before-define': [ + 'error', + { + functions: false, + }, + ], + 'block-scoped-var': [ + 'error', + ], + 'curly': [ + 'warn', + ], + 'default-case-last': [ + 'warn', + ], + 'default-param-last': [ + 'error', + ], + 'eqeqeq': [ + 'error', + 'smart', + ], + 'func-names': [ + 'warn', + 'never', + ], + 'func-style': [ + 'warn', + 'expression', + ], + 'logical-assignment-operators': [ + 'warn', + 'always', + ], + 'no-array-constructor': [ + 'error', + ], + 'no-empty-function': [ + 'warn', + ], + 'no-empty-static-block': [ + 'warn', + ], + 'no-extend-native': [ + 'error', + ], + 'no-extra-bind': [ + 'warn', + ], + 'no-implicit-coercion': [ + 'warn', + ], + 'no-iterator': [ + 'error', + ], + 'no-labels': [ + 'error', + ], + 'no-lone-blocks': [ + 'error', + ], + 'no-lonely-if': [ + 'error', + ], + 'no-loop-func': [ + 'error', + ], + 'no-magic-numbers': [ + 'error', + { + ignore: [ + -1, + 0.1, + 0, + 1, + 2, + 3, + 4, + 5, + 10, + 12, + 33, + 66, + 100, + 255, + 360, + 450, + 500, + 1000, + ], + ignoreDefaultValues: true, + ignoreClassFieldInitialValues: true, + }, + ], + 'no-multi-assign': [ + 'error', + ], + 'no-new-wrappers': [ + 'error', + ], + 'no-object-constructor': [ + 'error', + ], + 'no-proto': [ + 'error', + ], + 'no-return-assign': [ + 'error', + ], + 'no-sequences': [ + 'error', + ], + 'no-shadow': [ + 'error', + { + builtinGlobals: true, + allow: [ + 'Window', + ], + }, + ], + 'no-undef-init': [ + 'warn', + ], + 'no-undefined': [ + 'error', + ], + 'no-useless-constructor': [ + 'warn', + ], + 'no-useless-escape': [ + 'off', + ], + 'no-useless-return': [ + 'error', + ], + 'no-var': [ + 'error', + ], + 'no-void': [ + 'off', + ], + 'no-with': [ + 'error', + ], + 'object-shorthand': [ + 'error', + 'always', + ], + 'one-var': [ + 'error', + 'never', + ], + 'operator-assignment': [ + 'warn', + 'always', + ], + 'prefer-arrow-callback': [ + 'error', + ], + 'prefer-const': [ + 'error', + ], + 'prefer-object-has-own': [ + 'error', + ], + 'prefer-regex-literals': [ + 'error', + ], + 'prefer-template': [ + 'warn', + ], + 'no-prototype-builtins': 'off', + '@typescript-eslint/no-var-requires': [ + 'off', + ], + '@stylistic/array-bracket-newline': [ + 'warn', + 'consistent', + ], + '@stylistic/array-bracket-spacing': [ + 'warn', + 'never', + ], + '@stylistic/arrow-parens': [ + 'warn', + 'always', + ], + '@stylistic/brace-style': [ + 'warn', + 'stroustrup', + ], + '@stylistic/comma-dangle': [ + 'warn', + 'always-multiline', + ], + '@stylistic/comma-spacing': [ + 'warn', + { + before: false, + after: true, + }, + ], + '@stylistic/comma-style': [ + 'error', + 'last', + ], + '@stylistic/dot-location': [ + 'error', + 'property', + ], + '@stylistic/function-call-argument-newline': [ + 'warn', + 'consistent', + ], + '@stylistic/function-paren-newline': [ + 'warn', + 'consistent', + ], + '@stylistic/indent': [ + 'warn', + 4, + { + SwitchCase: 1, + ignoreComments: true, + ignoredNodes: ['TemplateLiteral > *'], + }, + ], + '@stylistic/key-spacing': [ + 'warn', + { + beforeColon: false, + afterColon: true, + }, + ], + '@stylistic/keyword-spacing': [ + 'warn', + { + before: true, + }, + ], + '@stylistic/linebreak-style': [ + 'error', + 'unix', + ], + '@stylistic/lines-between-class-members': [ + 'warn', + 'always', + { + exceptAfterSingleLine: true, + }, + ], + '@stylistic/max-len': [ + 'warn', + { + code: 105, + ignoreComments: true, + ignoreTrailingComments: true, + ignoreUrls: true, + }, + ], + '@stylistic/multiline-ternary': [ + 'warn', + 'always-multiline', + ], + '@stylistic/new-parens': [ + 'error', + ], + '@stylistic/no-mixed-operators': [ + 'warn', + ], + '@stylistic/no-mixed-spaces-and-tabs': [ + 'error', + ], + '@stylistic/no-multi-spaces': [ + 'error', + ], + '@stylistic/no-tabs': [ + 'error', + ], + '@stylistic/no-trailing-spaces': [ + 'error', + ], + '@stylistic/no-whitespace-before-property': [ + 'warn', + ], + '@stylistic/nonblock-statement-body-position': [ + 'error', + 'below', + ], + '@stylistic/object-curly-newline': [ + 'warn', + { + consistent: true, + }, + ], + '@stylistic/object-curly-spacing': [ + 'warn', + 'always', + ], + '@stylistic/operator-linebreak': [ + 'warn', + 'after', + ], + '@stylistic/padded-blocks': [ + 'error', + 'never', + ], + '@stylistic/padding-line-between-statements': [ + 'warn', + { + blankLine: 'always', + prev: '*', + next: 'return', + }, + { + blankLine: 'always', + prev: [ + 'const', + 'let', + 'var', + ], + next: '*', + }, + { + blankLine: 'any', + prev: [ + 'const', + 'let', + 'var', + ], + next: [ + 'const', + 'let', + 'var', + ], + }, + { + blankLine: 'always', + prev: [ + 'case', + 'default', + ], + next: '*', + }, + ], + '@stylistic/quote-props': [ + 'error', + 'consistent-as-needed', + ], + '@stylistic/quotes': [ + 'error', + 'single', + { + avoidEscape: true, + }, + ], + '@stylistic/semi': [ + 'error', + 'always', + ], + '@stylistic/semi-spacing': [ + 'warn', + ], + '@stylistic/space-before-blocks': [ + 'warn', + ], + '@stylistic/space-before-function-paren': [ + 'warn', + 'never', + ], + '@stylistic/space-infix-ops': [ + 'warn', + ], + '@stylistic/spaced-comment': [ + 'warn', + 'always', + ], + '@stylistic/switch-colon-spacing': [ + 'warn', + ], + '@stylistic/wrap-regex': [ + 'warn', + ], + }, +}); diff --git a/apps/config/index.ts b/apps/config/index.ts new file mode 100644 index 00000000..1b8d2a33 --- /dev/null +++ b/apps/config/index.ts @@ -0,0 +1,3 @@ +import eslintConf from './eslint.config'; + +export default eslintConf; diff --git a/apps/config/package-lock.json b/apps/config/package-lock.json new file mode 100644 index 00000000..f096d501 Binary files /dev/null and b/apps/config/package-lock.json differ diff --git a/apps/config/package.json b/apps/config/package.json new file mode 100644 index 00000000..5cb9dd33 --- /dev/null +++ b/apps/config/package.json @@ -0,0 +1,16 @@ +{ + "name": "eslint-conf", + "version": "0.0.0", + "type": "module", + "exports": "./index.ts", + "devDependencies": { + "@eslint/js": "9.17.0", + "@stylistic/eslint-plugin": "2.12.1", + "eslint": "9.17.0", + "eslint-plugin-jsdoc": "50.6.1", + "jiti": "2.4.2", + "pkg-types": "1.2.1", + "typescript": "5.7.2", + "typescript-eslint": "8.18.1" + } +} diff --git a/apps/tsconfig.json b/apps/config/tsconfig.base.json similarity index 100% rename from apps/tsconfig.json rename to apps/config/tsconfig.base.json diff --git a/apps/config/tsconfig.json b/apps/config/tsconfig.json new file mode 100644 index 00000000..fbea8199 --- /dev/null +++ b/apps/config/tsconfig.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "./tsconfig.base.json", + "includes": [ + "*.ts", + "**/*.ts", + "*.js", + "**/*.js" + ] +} diff --git a/apps/extract-subs/default.nix b/apps/extract-subs/default.nix index df5b494d..96f5ec71 100644 --- a/apps/extract-subs/default.nix +++ b/apps/extract-subs/default.nix @@ -5,7 +5,7 @@ }: buildApp { src = ./.; - npmDepsHash = "sha256-yrpzsd0w422T/9kErK1gBQm1RjdAA3foOHEUcZXhlzQ="; + npmDepsHash = "sha256-ytaO1mqoORNB5rP/8X/WpIoHkxmi1+Pc6Nep02+fTZ8="; runtimeInputs = [ ffmpeg-full diff --git a/apps/extract-subs/eslint.config.ts b/apps/extract-subs/eslint.config.ts index 48b1f19a..7d0908f3 100644 --- a/apps/extract-subs/eslint.config.ts +++ b/apps/extract-subs/eslint.config.ts @@ -1,454 +1,3 @@ -import eslint from '@eslint/js'; -import jsdoc from 'eslint-plugin-jsdoc'; -import stylistic from '@stylistic/eslint-plugin'; -import tseslint from 'typescript-eslint'; +import eslintConf from 'eslint-conf'; - -export default tseslint.config({ - files: ['**/*.{js,ts,tsx}'], - ignores: ['node_modules/**', 'types/**'], - - extends: [ - eslint.configs.recommended, - jsdoc.configs['flat/recommended-typescript'], - stylistic.configs['recommended-flat'], - ...tseslint.configs.recommended, - ...tseslint.configs.stylistic, - ], - - rules: { - // JSDoc settings - 'jsdoc/tag-lines': ['warn', 'any', { startLines: 1 }], - 'jsdoc/check-line-alignment': ['warn', 'always', { - tags: ['param', 'arg', 'argument', 'property', 'prop'], - }], - 'jsdoc/no-types': 'off', - - // Newer settings - '@typescript-eslint/no-extraneous-class': ['off'], - '@typescript-eslint/no-implied-eval': ['off'], - 'class-methods-use-this': 'off', - '@stylistic/no-multiple-empty-lines': 'off', - '@stylistic/jsx-indent-props': 'off', - 'no-use-before-define': 'off', - '@typescript-eslint/no-use-before-define': 'error', - '@stylistic/indent-binary-ops': 'off', - '@stylistic/max-statements-per-line': [ - 'error', - { max: 2 }, - ], - - // Pre-flat config - '@typescript-eslint/no-unused-vars': [ - 'error', - { - args: 'all', - argsIgnorePattern: '^_', - caughtErrors: 'all', - caughtErrorsIgnorePattern: '^_', - destructuredArrayIgnorePattern: '^_', - varsIgnorePattern: '^_', - ignoreRestSiblings: true, - }, - ], - - 'array-callback-return': [ - 'error', - { - allowImplicit: true, - checkForEach: true, - }, - ], - 'no-constructor-return': [ - 'error', - ], - 'no-unreachable-loop': [ - 'error', - { - ignore: [ - 'ForInStatement', - 'ForOfStatement', - ], - }, - ], - 'block-scoped-var': [ - 'error', - ], - 'curly': [ - 'warn', - ], - 'default-case-last': [ - 'warn', - ], - 'default-param-last': [ - 'error', - ], - 'eqeqeq': [ - 'error', - 'smart', - ], - 'func-names': [ - 'warn', - 'never', - ], - 'func-style': [ - 'warn', - 'expression', - ], - 'logical-assignment-operators': [ - 'warn', - 'always', - ], - 'no-array-constructor': [ - 'error', - ], - 'no-empty-function': [ - 'warn', - ], - 'no-empty-static-block': [ - 'warn', - ], - 'no-extend-native': [ - 'error', - ], - 'no-extra-bind': [ - 'warn', - ], - 'no-implicit-coercion': [ - 'warn', - ], - 'no-iterator': [ - 'error', - ], - 'no-labels': [ - 'error', - ], - 'no-lone-blocks': [ - 'error', - ], - 'no-lonely-if': [ - 'error', - ], - 'no-loop-func': [ - 'error', - ], - 'no-magic-numbers': [ - 'error', - { - ignore: [ - -1, - 0.1, - 0, - 1, - 2, - 3, - 4, - 5, - 10, - 12, - 33, - 66, - 100, - 255, - 360, - 450, - 500, - 1000, - ], - ignoreDefaultValues: true, - ignoreClassFieldInitialValues: true, - }, - ], - 'no-multi-assign': [ - 'error', - ], - 'no-new-wrappers': [ - 'error', - ], - 'no-object-constructor': [ - 'error', - ], - 'no-proto': [ - 'error', - ], - 'no-return-assign': [ - 'error', - ], - 'no-sequences': [ - 'error', - ], - 'no-shadow': [ - 'error', - { - builtinGlobals: true, - allow: [ - 'Window', - ], - }, - ], - 'no-undef-init': [ - 'warn', - ], - 'no-undefined': [ - 'error', - ], - 'no-useless-constructor': [ - 'warn', - ], - 'no-useless-escape': [ - 'off', - ], - 'no-useless-return': [ - 'error', - ], - 'no-var': [ - 'error', - ], - 'no-void': [ - 'off', - ], - 'no-with': [ - 'error', - ], - 'object-shorthand': [ - 'error', - 'always', - ], - 'one-var': [ - 'error', - 'never', - ], - 'operator-assignment': [ - 'warn', - 'always', - ], - 'prefer-arrow-callback': [ - 'error', - ], - 'prefer-const': [ - 'error', - ], - 'prefer-object-has-own': [ - 'error', - ], - 'prefer-regex-literals': [ - 'error', - ], - 'prefer-template': [ - 'warn', - ], - 'no-prototype-builtins': 'off', - '@typescript-eslint/no-var-requires': [ - 'off', - ], - '@stylistic/array-bracket-newline': [ - 'warn', - 'consistent', - ], - '@stylistic/array-bracket-spacing': [ - 'warn', - 'never', - ], - '@stylistic/arrow-parens': [ - 'warn', - 'always', - ], - '@stylistic/brace-style': [ - 'warn', - 'stroustrup', - { allowSingleLine: true }, - ], - '@stylistic/comma-dangle': [ - 'warn', - 'always-multiline', - ], - '@stylistic/comma-spacing': [ - 'warn', - { - before: false, - after: true, - }, - ], - '@stylistic/comma-style': [ - 'error', - 'last', - ], - '@stylistic/dot-location': [ - 'error', - 'property', - ], - '@stylistic/function-call-argument-newline': [ - 'warn', - 'consistent', - ], - '@stylistic/function-paren-newline': [ - 'warn', - 'consistent', - ], - '@stylistic/indent': [ - 'warn', - 4, - { - SwitchCase: 1, - ignoreComments: true, - ignoredNodes: ['TemplateLiteral > *'], - }, - ], - '@stylistic/key-spacing': [ - 'warn', - { - beforeColon: false, - afterColon: true, - }, - ], - '@stylistic/keyword-spacing': [ - 'warn', - { - before: true, - }, - ], - '@stylistic/linebreak-style': [ - 'error', - 'unix', - ], - '@stylistic/lines-between-class-members': [ - 'warn', - 'always', - { - exceptAfterSingleLine: true, - }, - ], - '@stylistic/max-len': [ - 'warn', - { - code: 105, - ignoreComments: true, - ignoreTrailingComments: true, - ignoreUrls: true, - }, - ], - '@stylistic/multiline-ternary': [ - 'warn', - 'always-multiline', - ], - '@stylistic/new-parens': [ - 'error', - ], - '@stylistic/no-mixed-operators': [ - 'warn', - ], - '@stylistic/no-mixed-spaces-and-tabs': [ - 'error', - ], - '@stylistic/no-multi-spaces': [ - 'error', - ], - '@stylistic/no-tabs': [ - 'error', - ], - '@stylistic/no-trailing-spaces': [ - 'error', - ], - '@stylistic/no-whitespace-before-property': [ - 'warn', - ], - '@stylistic/nonblock-statement-body-position': [ - 'error', - 'below', - ], - '@stylistic/object-curly-newline': [ - 'warn', - { - consistent: true, - }, - ], - '@stylistic/object-curly-spacing': [ - 'warn', - 'always', - ], - '@stylistic/operator-linebreak': [ - 'warn', - 'after', - ], - '@stylistic/padded-blocks': [ - 'error', - 'never', - ], - '@stylistic/padding-line-between-statements': [ - 'warn', - { - blankLine: 'always', - prev: '*', - next: 'return', - }, - { - blankLine: 'always', - prev: [ - 'const', - 'let', - 'var', - ], - next: '*', - }, - { - blankLine: 'any', - prev: [ - 'const', - 'let', - 'var', - ], - next: [ - 'const', - 'let', - 'var', - ], - }, - { - blankLine: 'always', - prev: [ - 'case', - 'default', - ], - next: '*', - }, - ], - '@stylistic/quote-props': [ - 'error', - 'consistent-as-needed', - ], - '@stylistic/quotes': [ - 'error', - 'single', - { - avoidEscape: true, - }, - ], - '@stylistic/semi': [ - 'error', - 'always', - ], - '@stylistic/semi-spacing': [ - 'warn', - ], - '@stylistic/space-before-blocks': [ - 'warn', - ], - '@stylistic/space-before-function-paren': [ - 'warn', - 'never', - ], - '@stylistic/space-infix-ops': [ - 'warn', - ], - '@stylistic/spaced-comment': [ - 'warn', - 'always', - ], - '@stylistic/switch-colon-spacing': [ - 'warn', - ], - '@stylistic/wrap-regex': [ - 'warn', - ], - }, -}); +export default eslintConf; diff --git a/apps/extract-subs/package-lock.json b/apps/extract-subs/package-lock.json index 7920888e..37aeca8c 100644 Binary files a/apps/extract-subs/package-lock.json and b/apps/extract-subs/package-lock.json differ diff --git a/apps/extract-subs/package.json b/apps/extract-subs/package.json index 2f9d8e9f..fd4b6871 100644 --- a/apps/extract-subs/package.json +++ b/apps/extract-subs/package.json @@ -11,14 +11,11 @@ "fluent-ffmpeg": "2.1.3" }, "devDependencies": { - "@eslint/js": "9.16.0", - "@stylistic/eslint-plugin": "2.11.0", - "@types/node": "22.10.1", - "esbuild": "0.24.0", - "eslint": "9.16.0", - "eslint-plugin-jsdoc": "50.6.0", - "jiti": "2.4.1", - "typescript": "5.7.2", - "typescript-eslint": "8.17.0" + "eslint-conf": "file:../config", + "@types/node": "22.10.2", + "esbuild": "0.24.2", + "eslint": "9.17.0", + "jiti": "2.4.2", + "typescript": "5.7.2" } } diff --git a/apps/extract-subs/tsconfig.json b/apps/extract-subs/tsconfig.json index 2c06e799..763e4667 100644 --- a/apps/extract-subs/tsconfig.json +++ b/apps/extract-subs/tsconfig.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/tsconfig", - "extends": "../tsconfig.json", + "extends": "../config/tsconfig.base.json", "includes": [ "*.ts", "**/*.ts", diff --git a/apps/nix/buildApp.nix b/apps/nix/buildApp.nix index 8c1dc545..a9689893 100644 --- a/apps/nix/buildApp.nix +++ b/apps/nix/buildApp.nix @@ -22,7 +22,7 @@ in prePatch = '' mv ./tsconfig.json ./project.json - sed 's/^ *\/\/.*//' ${../tsconfig.json} > ./base.json + sed 's/^ *\/\/.*//' ${../config/tsconfig.json} > ./base.json ${jq}/bin/jq -sr '.[0] * .[1] | del(.extends)' ./project.json ./base.json > ./tsconfig.json rm base.json project.json ''; diff --git a/apps/update-sources/default.nix b/apps/update-sources/default.nix index 16b56ed1..4eb86b07 100644 --- a/apps/update-sources/default.nix +++ b/apps/update-sources/default.nix @@ -7,7 +7,7 @@ }: buildApp { src = ./.; - npmDepsHash = "sha256-ROB8aqyiwVJJzTEIf8oxuD1n6yhJCGb46i9aDmA7b8Y="; + npmDepsHash = "sha256-vIhR/+Pgj35sv/ZX1iL+xWheu6w7vQeJy4OEfa8tXFw="; runtimeInputs = [ nodejs_latest diff --git a/apps/update-sources/eslint.config.ts b/apps/update-sources/eslint.config.ts index f6bb50a7..7d0908f3 100644 --- a/apps/update-sources/eslint.config.ts +++ b/apps/update-sources/eslint.config.ts @@ -1,451 +1,3 @@ -import eslint from '@eslint/js'; -import jsdoc from 'eslint-plugin-jsdoc'; -import stylistic from '@stylistic/eslint-plugin'; -import tseslint from 'typescript-eslint'; +import eslintConf from 'eslint-conf'; - -export default tseslint.config({ - files: ['**/*.js', '**/*.ts'], - ignores: ['node_modules/**', 'types/**'], - - extends: [ - eslint.configs.recommended, - jsdoc.configs['flat/recommended-typescript'], - stylistic.configs['recommended-flat'], - ...tseslint.configs.recommended, - ...tseslint.configs.stylistic, - ], - - rules: { - // JSDoc settings - 'jsdoc/tag-lines': ['warn', 'any', { startLines: 1 }], - 'jsdoc/check-line-alignment': ['warn', 'always', { - tags: ['param', 'arg', 'argument', 'property', 'prop'], - }], - 'jsdoc/no-types': 'off', - - // Newer settings - '@typescript-eslint/no-extraneous-class': ['off'], - '@typescript-eslint/no-implied-eval': ['off'], - 'class-methods-use-this': 'off', - '@stylistic/no-multiple-empty-lines': 'off', - - // Pre-flat config - '@typescript-eslint/no-unused-vars': [ - 'error', - { - args: 'all', - argsIgnorePattern: '^_', - caughtErrors: 'all', - caughtErrorsIgnorePattern: '^_', - destructuredArrayIgnorePattern: '^_', - varsIgnorePattern: '^_', - ignoreRestSiblings: true, - }, - ], - - 'array-callback-return': [ - 'error', - { - allowImplicit: true, - checkForEach: true, - }, - ], - 'no-constructor-return': [ - 'error', - ], - 'no-unreachable-loop': [ - 'error', - { - ignore: [ - 'ForInStatement', - 'ForOfStatement', - ], - }, - ], - 'no-use-before-define': [ - 'error', - { - functions: false, - }, - ], - 'block-scoped-var': [ - 'error', - ], - 'curly': [ - 'warn', - ], - 'default-case-last': [ - 'warn', - ], - 'default-param-last': [ - 'error', - ], - 'eqeqeq': [ - 'error', - 'smart', - ], - 'func-names': [ - 'warn', - 'never', - ], - 'func-style': [ - 'warn', - 'expression', - ], - 'logical-assignment-operators': [ - 'warn', - 'always', - ], - 'no-array-constructor': [ - 'error', - ], - 'no-empty-function': [ - 'warn', - ], - 'no-empty-static-block': [ - 'warn', - ], - 'no-extend-native': [ - 'error', - ], - 'no-extra-bind': [ - 'warn', - ], - 'no-implicit-coercion': [ - 'warn', - ], - 'no-iterator': [ - 'error', - ], - 'no-labels': [ - 'error', - ], - 'no-lone-blocks': [ - 'error', - ], - 'no-lonely-if': [ - 'error', - ], - 'no-loop-func': [ - 'error', - ], - 'no-magic-numbers': [ - 'error', - { - ignore: [ - -1, - 0.1, - 0, - 1, - 2, - 3, - 4, - 5, - 10, - 12, - 33, - 66, - 100, - 255, - 360, - 450, - 500, - 1000, - ], - ignoreDefaultValues: true, - ignoreClassFieldInitialValues: true, - }, - ], - 'no-multi-assign': [ - 'error', - ], - 'no-new-wrappers': [ - 'error', - ], - 'no-object-constructor': [ - 'error', - ], - 'no-proto': [ - 'error', - ], - 'no-return-assign': [ - 'error', - ], - 'no-sequences': [ - 'error', - ], - 'no-shadow': [ - 'error', - { - builtinGlobals: true, - allow: [ - 'Window', - ], - }, - ], - 'no-undef-init': [ - 'warn', - ], - 'no-undefined': [ - 'error', - ], - 'no-useless-constructor': [ - 'warn', - ], - 'no-useless-escape': [ - 'off', - ], - 'no-useless-return': [ - 'error', - ], - 'no-var': [ - 'error', - ], - 'no-void': [ - 'off', - ], - 'no-with': [ - 'error', - ], - 'object-shorthand': [ - 'error', - 'always', - ], - 'one-var': [ - 'error', - 'never', - ], - 'operator-assignment': [ - 'warn', - 'always', - ], - 'prefer-arrow-callback': [ - 'error', - ], - 'prefer-const': [ - 'error', - ], - 'prefer-object-has-own': [ - 'error', - ], - 'prefer-regex-literals': [ - 'error', - ], - 'prefer-template': [ - 'warn', - ], - 'no-prototype-builtins': 'off', - '@typescript-eslint/no-var-requires': [ - 'off', - ], - '@stylistic/array-bracket-newline': [ - 'warn', - 'consistent', - ], - '@stylistic/array-bracket-spacing': [ - 'warn', - 'never', - ], - '@stylistic/arrow-parens': [ - 'warn', - 'always', - ], - '@stylistic/brace-style': [ - 'warn', - 'stroustrup', - ], - '@stylistic/comma-dangle': [ - 'warn', - 'always-multiline', - ], - '@stylistic/comma-spacing': [ - 'warn', - { - before: false, - after: true, - }, - ], - '@stylistic/comma-style': [ - 'error', - 'last', - ], - '@stylistic/dot-location': [ - 'error', - 'property', - ], - '@stylistic/function-call-argument-newline': [ - 'warn', - 'consistent', - ], - '@stylistic/function-paren-newline': [ - 'warn', - 'consistent', - ], - '@stylistic/indent': [ - 'warn', - 4, - { - SwitchCase: 1, - ignoreComments: true, - ignoredNodes: ['TemplateLiteral > *'], - }, - ], - '@stylistic/key-spacing': [ - 'warn', - { - beforeColon: false, - afterColon: true, - }, - ], - '@stylistic/keyword-spacing': [ - 'warn', - { - before: true, - }, - ], - '@stylistic/linebreak-style': [ - 'error', - 'unix', - ], - '@stylistic/lines-between-class-members': [ - 'warn', - 'always', - { - exceptAfterSingleLine: true, - }, - ], - '@stylistic/max-len': [ - 'warn', - { - code: 105, - ignoreComments: true, - ignoreTrailingComments: true, - ignoreUrls: true, - }, - ], - '@stylistic/multiline-ternary': [ - 'warn', - 'always-multiline', - ], - '@stylistic/new-parens': [ - 'error', - ], - '@stylistic/no-mixed-operators': [ - 'warn', - ], - '@stylistic/no-mixed-spaces-and-tabs': [ - 'error', - ], - '@stylistic/no-multi-spaces': [ - 'error', - ], - '@stylistic/no-tabs': [ - 'error', - ], - '@stylistic/no-trailing-spaces': [ - 'error', - ], - '@stylistic/no-whitespace-before-property': [ - 'warn', - ], - '@stylistic/nonblock-statement-body-position': [ - 'error', - 'below', - ], - '@stylistic/object-curly-newline': [ - 'warn', - { - consistent: true, - }, - ], - '@stylistic/object-curly-spacing': [ - 'warn', - 'always', - ], - '@stylistic/operator-linebreak': [ - 'warn', - 'after', - ], - '@stylistic/padded-blocks': [ - 'error', - 'never', - ], - '@stylistic/padding-line-between-statements': [ - 'warn', - { - blankLine: 'always', - prev: '*', - next: 'return', - }, - { - blankLine: 'always', - prev: [ - 'const', - 'let', - 'var', - ], - next: '*', - }, - { - blankLine: 'any', - prev: [ - 'const', - 'let', - 'var', - ], - next: [ - 'const', - 'let', - 'var', - ], - }, - { - blankLine: 'always', - prev: [ - 'case', - 'default', - ], - next: '*', - }, - ], - '@stylistic/quote-props': [ - 'error', - 'consistent-as-needed', - ], - '@stylistic/quotes': [ - 'error', - 'single', - { - avoidEscape: true, - }, - ], - '@stylistic/semi': [ - 'error', - 'always', - ], - '@stylistic/semi-spacing': [ - 'warn', - ], - '@stylistic/space-before-blocks': [ - 'warn', - ], - '@stylistic/space-before-function-paren': [ - 'warn', - 'never', - ], - '@stylistic/space-infix-ops': [ - 'warn', - ], - '@stylistic/spaced-comment': [ - 'warn', - 'always', - ], - '@stylistic/switch-colon-spacing': [ - 'warn', - ], - '@stylistic/wrap-regex': [ - 'warn', - ], - }, -}); +export default eslintConf; diff --git a/apps/update-sources/package-lock.json b/apps/update-sources/package-lock.json index d2df2820..61b74f38 100644 Binary files a/apps/update-sources/package-lock.json and b/apps/update-sources/package-lock.json differ diff --git a/apps/update-sources/package.json b/apps/update-sources/package.json index d2e25bb0..5cb2e472 100644 --- a/apps/update-sources/package.json +++ b/apps/update-sources/package.json @@ -7,15 +7,12 @@ "build": "node_ver=$(node -v); esbuild src/app.ts --bundle --platform=node --target=\"node${node_ver:1:2}\" --outfile=out/bin/app.cjs" }, "devDependencies": { - "@eslint/js": "9.17.0", - "@stylistic/eslint-plugin": "2.12.1", + "eslint-conf": "file:../config", "@types/node": "22.10.2", - "esbuild": "0.24.0", + "esbuild": "0.24.2", "eslint": "9.17.0", - "eslint-plugin-jsdoc": "50.6.1", "jiti": "2.4.2", "pkg-types": "1.2.1", - "typescript": "5.7.2", - "typescript-eslint": "8.18.1" + "typescript": "5.7.2" } } diff --git a/apps/update-sources/tsconfig.json b/apps/update-sources/tsconfig.json index 2c06e799..763e4667 100644 --- a/apps/update-sources/tsconfig.json +++ b/apps/update-sources/tsconfig.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/tsconfig", - "extends": "../tsconfig.json", + "extends": "../config/tsconfig.base.json", "includes": [ "*.ts", "**/*.ts", diff --git a/devShells/default.nix b/devShells/default.nix index 44e178eb..e5f867f1 100644 --- a/devShells/default.nix +++ b/devShells/default.nix @@ -75,6 +75,7 @@ in { inherit (pkgs) nodejs_latest + typescript ; inherit @@ -88,6 +89,7 @@ in { inherit (pkgs) nodejs_latest + typescript ffmpeg-full ;