/
githubmirror
/
pixijs
Обзор
Документация
Войти
/
githubmirror
/
pixijs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
eslint.config.mjs
213 строк
7 KB
Mat Groves
feat: implement transientAttachment for MSAA RenderTextures for WebGPU (#12050)
02 июн 2026, 21:40
Не верифицирован
02 июн 2026, 21:40
1d1e44c
Код
Авторство
О чём код?
import pluginJest from 'eslint-plugin-jest'; import jsdoc from 'eslint-plugin-jsdoc'; import noMixed from 'eslint-plugin-no-mixed-operators'; import tseslint from 'typescript-eslint'; import config from '@pixi/eslint-config'; import requireExport from './scripts/plugins/eslint-require-export.mjs'; import requireMemberAPI from './scripts/plugins/eslint-require-modifier.mjs'; import requireTildeImports from './scripts/plugins/eslint-require-tilde-imports.mjs'; import stylistic from '@stylistic/eslint-plugin'; export default tseslint.config( ...config, { ignores: [ '.s3_uploads', '.context', 'out', 'docs', 'dist', 'lib', 'transcoders', 'node_modules', 'src/*/**/index.ts', 'src/**/__docs__/examples/**/*.js', 'playground/dist', ], }, { files: ['**/*'], plugins: { jsdoc, 'no-mixed-operators': noMixed, }, settings: { jsdoc: { tagNamePreference: { method: 'method', function: 'function', extends: 'extends', typeParam: 'typeParam', api: 'api', }, }, }, rules: { 'no-mixed-operators': 'off', 'no-mixed-operators/no-mixed-operators': 1, 'jsdoc/multiline-blocks': [ 1, { noMultilineBlocks: true, minimumLengthForMultiline: 115, multilineTags: ['param', 'returns', 'see', 'deprecated', 'typeParam'], }, ], 'jsdoc/check-access': 1, 'jsdoc/check-alignment': 1, 'jsdoc/check-param-names': 1, 'jsdoc/check-property-names': 1, 'jsdoc/check-tag-names': 0, 'jsdoc/check-types': 1, 'jsdoc/check-values': 1, 'jsdoc/empty-tags': 1, 'jsdoc/implements-on-classes': 1, 'jsdoc/tag-lines': 1, 'jsdoc/no-multi-asterisks': [1, { allowWhitespace: true }], 'jsdoc/require-param': 1, 'jsdoc/require-param-description': 0, 'jsdoc/require-param-name': 1, 'jsdoc/require-param-type': ['warn', { contexts: ['TSMethodSignature'] }], 'jsdoc/require-property': 1, 'jsdoc/require-property-description': 1, 'jsdoc/require-property-name': 1, 'jsdoc/require-property-type': 1, 'jsdoc/require-returns-description': 1, 'jsdoc/require-hyphen-before-param-description': 1, 'jsdoc/valid-types': 1, }, }, { files: ['**/*.{ts,tsx,mts,cts}'], rules: { '@typescript-eslint/triple-slash-reference': [1, { path: 'always' }], '@typescript-eslint/prefer-readonly': 'error', '@typescript-eslint/explicit-member-accessibility': [ 'error', { accessibility: 'explicit', overrides: { accessors: 'off', constructors: 'no-public', methods: 'explicit', properties: 'explicit', parameterProperties: 'explicit', }, }, ], '@typescript-eslint/naming-convention': [ 'error', { selector: 'memberLike', modifiers: ['private'], format: ['camelCase'], leadingUnderscore: 'require', }, ], '@typescript-eslint/no-unsafe-declaration-merging': 0, '@typescript-eslint/no-duplicate-enum-values': 0, }, }, { // update this to match your test files files: ['**/*.test.ts'], plugins: { jest: pluginJest }, languageOptions: { globals: pluginJest.environments.globals.globals, }, rules: { ...pluginJest.configs['flat/recommended'].rules, '@typescript-eslint/explicit-member-accessibility': 0, '@typescript-eslint/no-unused-expressions': 0, '@typescript-eslint/dot-notation': [ 0, { allowPrivateClassPropertyAccess: true, allowProtectedClassPropertyAccess: true, allowIndexSignaturePropertyAccess: true, }, ], 'dot-notation': 0, 'jest/no-conditional-expect': 'off', 'jest/no-standalone-expect': 'off', 'jest/expect-expect': [ 'error', { assertFunctionNames: [ 'expect', 'check32BitColorMatches', 'assertRemovedFromParent', 'expectTypeOf', ], additionalTestBlockFunctions: [''], }, ], }, }, { files: ['**/*.test.ts', '**/*.scene.ts'], plugins: { requireTildeImports, }, rules: { 'requireTildeImports/require-tilde-imports': 'error', }, }, { files: ['src/**/*'], ignores: ['**/*.test.ts'], plugins: { requireExport, requireMemberAPI, }, rules: { 'requireExport/require-export-jsdoc': ['error'], 'requireMemberAPI/require-member-api-doc': ['error'], 'no-restricted-globals': [ 'warn', { name: 'document', message: 'Do not use document. Use DOMAdapter instead.', }, { name: 'Image', message: 'Do not use Image. Use DOMAdapter instead.', }, ], 'no-restricted-properties': [ 'warn', { object: 'URL', property: 'createObjectURL', message: 'Avoid using URL.createObjectURL. See https://github.com/pixijs/pixijs/pull/11599.', }, ], }, }, { files: ['examples/**', 'src/**/__docs__/examples/**'], rules: { '@stylistic/indent': [1, 2, { SwitchCase: 1 }], indent: [1, 2, { SwitchCase: 1 }], 'brace-style': [1, '1tbs', { allowSingleLine: true }], '@stylistic/brace-style': [1, '1tbs', { allowSingleLine: true }], 'jsdoc/require-param': 0, 'jsdoc/require-param-description': 0, 'jsdoc/require-param-name': 0, 'jsdoc/require-param-type': 0, 'jsdoc/require-returns-description': 0, 'jsdoc/require-returns-type': 0, 'jsdoc/require-returns': 0, 'jsdoc/require-returns-check': 0, 'max-len': 0, 'newline-after-var': 0, '@typescript-eslint/no-this-alias': 0, '@typescript-eslint/no-floating-promises': 0, 'func-names': 0, 'no-restricted-globals': 0, 'no-console': 0, }, plugins: { '@stylistic': stylistic }, }, );