-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type definitions that are necessary to not produce type errors should be marked #93
Comments
Here is an implementation for the rule targetting {
"eslintConfig": {
"env": {
"node": false,
"es2021": true,
"browser": false,
"commonjs": false,
"shared-node-browser": false
},
"rules": {
"no-restricted-syntax": [
"warn",
{
"selector": "CallExpression[callee.property.name='connect'][arguments.length=2][arguments.0.value='cancelled'][arguments.1.type='FunctionExpression']",
"message": "Calling .connect('cancelled', () => {}) on Gio.Cancellable instances is wrong, see https://gjs-docs.gnome.org/gio20~2.66p/gio.cancellable#method-connect"
},
{
"selector": "CallExpression[callee.property.name='connect'][arguments.length=2][arguments.0.value='cancelled'][arguments.1.type='ArrowFunctionExpression']",
"message": "Calling .connect('cancelled', () => {}) on Gio.Cancellable instances is wrong, see https://gjs-docs.gnome.org/gio20~2.66p/gio.cancellable#method-connect"
}
]
}
} This issue should depend on #94, right? |
@HeavenVolkoff We do not need to depend this on #94, I think we can just add the option to generate a eslint config. Or what do you think? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The Idea is use ESLint's no-restricted-syntax for that.
See also #87
The text was updated successfully, but these errors were encountered: