Open snebjorn opened 4 years ago
I think both of those things are good suggestions. Documentation is certainly lacking.
Adding the additional option should be fairly easy. This might be an argument to change our allowStandaloneDeclarations
to allowDeclarations
and match whatever functionality that package exposes.
I'll work on this stuff and close / comment this issue when I have something.
@TristonJ @snebjorn any update on this ? :)
@TristonJ @snebjorn Any updates?
@TristonJ I see that there's PR that should add this option. Can it be merged soon?
For now I have an override in Angular that disables on classProperties in certain files
{
// See no-restricted-syntax
"files": ["*[.-]component.ts", "*[.-]interceptor.ts"],
"rules": {
// Angular hooks should be named functions
// https://github.com/mojohaus/extra-enforcer-rules/issues/186
"extra-rules/potential-point-free": "warn",
"prefer-arrow/prefer-arrow-functions": [
"error",
{
...preferArrowFunctionsConfig,
https://github.com/TristonJ/eslint-plugin-prefer-arrow/issues/17
"classPropertiesAllowed": false,
},
],
},
},
But I would like to be able to tell this plugin to ignore: intercept, ngOnChanges, ngOnInit, ngDoCheck, ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked, ngOnDestroy, ...
typescript-eslint lists this plugin as the TSLint replacement for
only-arrow-functions
https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/ROADMAP.mdIf that's the case then it's missing the
allow-named-functions
option https://palantir.github.io/tslint/rules/only-arrow-functions/I'd also very much appreciate a rule details page that describe why we would want to use the rule etc. Much like typescript-eslint do https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-inferrable-types.md