Closed juicyarts closed 8 months ago
Hi @juicyarts!
Since this repo is unmaintained, you might want to re-open this issue in the @eslint-community fork https://github.com/eslint-community/eslint-plugin-eslint-comments
For more info about why we created this organization, you can read https://eslint.org/blog/2023/03/announcing-eslint-community-org
Tell us about your environment
Wrongly assigned this to eslint first (https://github.com/eslint/eslint/issues/12125)
What parser (default, Babel-ESLint, etc.) are you using?
Please show your full configuration:
Configuration
```js { parser: '@typescript-eslint/parser', env: { "browser": true, "node": true }, plugins: ['@typescript-eslint', 'jest', 'hapi', 'import', 'cypress',], extends: [ 'airbnb', 'plugin:eslint-comments/recommended', 'plugin:@typescript-eslint/recommended', ], parserOptions: { ecmaFeatures: { jsx: true, }, ecmaVersion: 2018, useJSXTextNode: true, project: './tsconfig.json', tsconfigRootDir: './', extraFileExtensions: ['.tsx'], }, overrides: [ { files: [ 'src/**/*.story.js', 'packages/**/*.story.js', '**/*.stories.ts', '**/*.stories.tsx', '**/setupTests.ts', ], rules: { 'import/no-extraneous-dependencies': [ 'error', { devDependencies: true, }, ], 'react/jsx-no-literals': 0, }, }, { files: [ '**/*.spec.tsx', '**/*.spec.ts', ], plugins: [ 'jest', ], env: { jest: true, }, rules: { 'jest/no-disabled-tests': 'warn', 'jest/no-focused-tests': 'error', 'jest/no-identical-title': 'error', 'jest/prefer-to-have-length': 'warn', 'jest/valid-expect': 'error', 'react/react-in-jsx-scope': 0, 'import/no-extraneous-dependencies': [ 'error', { devDependencies: true, }, ], }, }, { files: ['*.ts', '*.tsx'], rules: { '@typescript-eslint/camelcase': [2, { ignoreDestructuring: true }], 'lines-between-class-members': [0], '@typescript-eslint/no-unused-vars': [2, { args: 'none' }], 'react/jsx-curly-spacing': [2, "always"], 'padded-blocks': [0], 'import/no-extraneous-dependencies': [ 1, ], }, }, { files: [ '**/*.definitions.ts' ], rules: { 'import/prefer-default-export': 0 } }, { files: [ '**/setup-tests.ts', '**/*.spec.ts', '**/*.spec.tsx', '**/*.stories.tsx', ], rules: { '@typescript-eslint/no-explicit-any': [0], 'react/jsx-no-literals': [0], '@typescript-eslint/explicit-function-return-type': [ 2, { allowExpressions: true, }, ], 'import/no-extraneous-dependencies': [ 2, { devDependencies: true, }, ], }, }, { files: ['**/*.tsx'], rules: { 'react/jsx-filename-extension': [ 1, { extensions: ['.tsx'], }, ], }, }, { files: ['config/**', 'scripts/**', '.takeoff/**'], rules: { 'import/no-extraneous-dependencies': 0, 'react/no-array-index-key': 0, '@typescript-eslint/no-var-requires': 0, 'no-console': 0, }, }, ], rules: { '@typescript-eslint/indent': 0, 'max-len': [ 0, { code: 120, ignoreComments: true, ignoreTralingCommas: true, ignoreUrls: true, ignoreStrings: true, ignoreTemplateLiterals: true, } ] }, settings: { 'import/extensions': ['.ts', '.tsx'], 'import/parsers': { '@typescript-eslint/parser': ['.ts', '.tsx'], }, 'import/resolver': { typescript: {}, node: { extensions: ['.ts', '.tsx'], }, }, 'import/ignore': ['utils'], }, } ```What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
What did you expect to happen? The enable/disable pair should work properly
What actually happened? Please include the actual, raw output from ESLint. It does not : /
I played around a bit and found out that this only happens when the element inside of the JSX/HTML part is self closing, so i guess it's kind of a parsing error? It also seems to be irrelevant what rule you want to enable/disable.
Tried @platinumazure 's suggestion and also your recommended way of disabling multiple rules but this did not work either.
Are you willing to submit a pull request to fix this bug?
I would need to dig into the source code which i do not not have the time to do right now due to project pressure. If this issue is still present in never versions and does affect many people i would try to investigate and open a pr in my spare time