Kargi-Sitesi/node_modules/codelyzer
2024-11-03 21:30:09 -05:00
..
util Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
componentClassSuffixRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
componentSelectorNameRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
componentSelectorPrefixRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
componentSelectorTypeRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
directiveClassSuffixRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
directiveSelectorNameRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
directiveSelectorPrefixRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
directiveSelectorTypeRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
importDestructuringSpacingRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
noAttributeParameterDecoratorRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
noForwardRefRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
noInputRenameRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
noOutputRenameRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
package.json Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
pipeImpureRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
pipeNamingRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
propertyDecoratorBase.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
README.md Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
selectorNameBase.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
useHostPropertyDecoratorRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
useInputPropertyDecoratorRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
useLifeCycleInterfaceRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
useOutputPropertyDecoratorRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00
usePipeTransformInterfaceRule.js Deployed the page to Github Pages. 2024-11-03 21:30:09 -05:00

Codelyzer

A set of tslint rules for static code analysis of Angular 2 TypeScript projects.

You can run the static code analyzer over web apps, NativeScript, Ionic, etc.

Install

npm install --save-dev codelyzer

Then hop to your tslint.json and add rulesDirectory which points to codelyzer, like this:

{
  "rulesDirectory": [
    "node_modules/codelyzer"
  ],
  "rules":{
  }
}

Now you can apply codelyzer rules to your tslint config. Enjoy!

Below you can find a recommended configuration which is based on the Angular 2 Style Guide.

{
  "directive-selector-name": [true, "camelCase"],
  "component-selector-name": [true, "kebab-case"],
  "directive-selector-type": [true, "attribute"],
  "component-selector-type": [true, "element"],
  "directive-selector-prefix": [true, "sg"],
  "component-selector-prefix": [true, "sg"],
  "use-input-property-decorator": true,
  "use-output-property-decorator": true,
  "use-host-property-decorator": true,
  "no-attribute-parameter-decorator": true,
  "no-input-rename": true,
  "no-output-rename": true,
  "no-forward-ref" :true,
  "use-life-cycle-interface": true,
  "use-pipe-transform-interface": true,
  "pipe-naming": [true, "camelCase", "sg"],
  "component-class-suffix": true,
  "directive-class-suffix": true,
  "import-destructuring-spacing": true
}

Roadmap

  • Directive selector type.
  • Directive selector name convention.
  • Directive selector name prefix.
  • Component selector type.
  • Component selector name convention.
  • Component selector name prefix.
  • Use @Input instead of inputs decorator property.
  • Use @Output instead of outputs decorator property.
  • Use @HostListeners and @HostBindings instead of host decorator property.
  • Implement life-cycle hooks explicitly.
  • Implement Pipe transform interface for pipes.
  • Proper naming for pipes (kebab-case, optionally prefixed).
  • Do not rename outputs.
  • Do not rename inputs.
  • Do not use forwardRef.
  • Do not use the @Attribute decorator.
  • Proper naming of directives and components (name plus (Directive|Component) suffix).
  • Do not use nativeElement injected with ElementRef.
  • Externalize template above n lines of code.
  • Rise a warning for impure pipes.
  • Do not declare global providers.
  • Follow convention for naming the routes.
  • Use @Injectable instead of @Inject.
  • Single export per module, except facade modules.
  • Proper naming of modules (kebab-case followed by module type followed by extension for regular modules, module name plus extension name for facades).
  • Verify if used directive is declared in the current component or any parent component.
  • Verify that property or method used in the template exists in the current context.
  • Locate component templates in the same directory.
  • Locate tests in the same directory (rise optional warning when no test file is found).
  • Rise warning on complex logic inside of the templates.
  • Do not manipulate elements referenced within the template.

License

MIT