ESLint running on CSS?

0:0 error Parsing error: ESLint was configured to run on `<tsconfigRootDir>/src/styles/globals.css` using `parserOptions.project`: /path/to/project/tsconfig.json
The extension for the file (`.css`) is non-standard. You should add `parserOptions.extraFileExtensions` to your config
0:0 error Parsing error: ESLint was configured to run on `<tsconfigRootDir>/src/styles/globals.css` using `parserOptions.project`: /path/to/project/tsconfig.json
The extension for the file (`.css`) is non-standard. You should add `parserOptions.extraFileExtensions` to your config
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path');

/** @type {import("eslint").Linter.Config} */
const config = {
overrides: [
{
extends: ['plugin:@typescript-eslint/recommended-requiring-type-checking'],
files: ['*.ts', '*.tsx'],
parserOptions: {
project: path.join(__dirname, 'tsconfig.json'),
},
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: path.join(__dirname, 'tsconfig.json'),
},
plugins: ['@typescript-eslint'],
extends: ['next/core-web-vitals', 'plugin:@typescript-eslint/recommended'],
rules: {
'@typescript-eslint/consistent-type-imports': [
'warn',
{
prefer: 'type-imports',
fixStyle: 'inline-type-imports',
},
],
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
},
};

module.exports = config;
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path');

/** @type {import("eslint").Linter.Config} */
const config = {
overrides: [
{
extends: ['plugin:@typescript-eslint/recommended-requiring-type-checking'],
files: ['*.ts', '*.tsx'],
parserOptions: {
project: path.join(__dirname, 'tsconfig.json'),
},
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: path.join(__dirname, 'tsconfig.json'),
},
plugins: ['@typescript-eslint'],
extends: ['next/core-web-vitals', 'plugin:@typescript-eslint/recommended'],
rules: {
'@typescript-eslint/consistent-type-imports': [
'warn',
{
prefer: 'type-imports',
fixStyle: 'inline-type-imports',
},
],
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
},
};

module.exports = config;
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server