my plugin
@bluelovers/eslint-plugin https://github.com/bluelovers/ws-node-bluelovers/tree/master/packages/eslint-plugin
my base config https://github.com/bluelovers/ws-node-bluelovers/blob/master/packages/eslintrc/.eslintrc.json
runtime user config
{
"extends": [
"bluelovers"
]
}
i can type in user repo
eslint --print-config .
this can show config and didn't error, i also see my plugin config inside the list
"@bluelovers/no-irregular-whitespace": [
"error",
{
"skipComments": true,
"skipStrings": false,
"skipTemplates": false,
"skipRegExps": false,
"ignores": [
" "
]
}
],
but when i type eslint index.ts
, it show error
1:1 error Definition for rule '@bluelovers/no-irregular-whitespace' was not found @bluelovers/no-irregular-whitespace
index.ts
export const r = /[ \t\uFEFF\xA0 ]+$/;
const IRREGULAR_WHITESPACE = /[\f\v ]+/mgu;
how can i fix this??
To limit ESLint to a specific project, place "root": true inside the . eslintrc. * file or eslintConfig field of the package. json file or in the .
I defines the severity of a rule. Severity should be one of the following: 0 = off, 1 = warning, 2 = error (you passed "3"). Documentation: https://eslint.org/docs/user-guide/configuring/rules.
The ESLint configuration is in the ./node_modules/@spm/eslint-config/index. js file. To check the code for ESLint violations, run the following command in the application root directory. Errors are listed in the console.
I think the key missing piece is no "plugins" section in config.
Why are you extending from "bluelovers"? Do you have a shared config published? It seems like you're working on a plugin, not a config.
You're then using a rule "@bluelovers/no-irregular-whitespace", with a leading @.
If your plugin is published as "@bluelovers/eslint-plugin", you should try something like this:
{
"plugins": ["@bluelovers"],
"extends": ["@bluelovers"], // Assuming you have @bluelovers/eslint-config published, otherwise this might look different or could be skipped
"rules": {
"@bluelovers/no-irregular-whitespace": ["error"]
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With