Skip to content

Some files are ignored #120

@NZhuravlev

Description

@NZhuravlev
  • Operating System: macOS Big Sur 11.5.2
  • Node Version: v14.17.6
  • NPM Version: 6.14.15
  • webpack Version: 4.46.0
  • eslint-webpack-plugin Version: 2.5.4

Expected Behavior

Errors in all the specified folders should be reported.

Actual Behavior

With either

new ESLintPlugin({
	files: ["src", "api-examples"],
	extensions: [".ts"],
	emitWarning: true,
	emitError: true,
	failOnWarning: true,
}),

or

new ESLintPlugin({
	extensions: [".ts"],
	emitWarning: true,
	emitError: true,
	failOnWarning: true,
}),

errors in the api-examples (one of the folders in the project) are not getting reported.

Code

eslintignore:

npm-api/*

.eslintrc.js:

module.exports = {
	"parser": "@typescript-eslint/parser",
	"parserOptions": {
		"ecmaVersion": 6,
		"sourceType": "module",
		"project": "./tsconfig.eslint.json",
		"tsconfigRootDir": __dirname
	},
...

tsconfig.eslint.json:

{
        ...
	"include": [
		"src/**/*.ts",
		"api-examples/**/*.ts"
	],
	"exclude": [
		"npm-api"
	]
}

How Do We Reproduce?

If I were to guess it's about setting up a ts project with similar rules. api-examples folder files here are not used by webpack while compiling - it might be a problem. The documentation says it's possible to lint files outside the compiler context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions