PixelOven.Lint
Overview
The Lint API provides a proxy for TsLint as well as StyleLint for handling linting for SCSS, CSS, JavaScript and TypeScript.
Styles
Argument | Description |
---|---|
css | An alias for scss . Implemented to help differentiate CSS from SCSS. |
scss | A proxy for the StyleLint linter with a few opinionated defaults for easier setup. |
Options
For reference on all the available options please review the official documentation for StyleLint.
It is important to note that currently this feature expects a stylelint.json file to be present at the root of the package to configure the compiler.
Setup
First be sure to create a stylelint.json file at the root of the project or in other words adjacent to the package.json.
PixelOven by default provides stylelint-config-recommended-scss as a dependency and highly recommends using this as a starting point for all SCSS based projects.
Usage
Once this has been confirmed all we have to do is run the following.
We can also target specific files.
StyleLint options can be passed through the CLI but it is highly recommended that this behavior be managed with in a stylelint.json file.
TypeScript
It is important to note that currently this feature expects a tslint.json file to be present at the root of the package to configure the compiler.
Argument | Description |
---|---|
ts | A proxy for the TSLint linter with a few opinionated defaults for easier setup. |
tsx | An alias for ts . Implemented to help differentiate JSX based projects. |
Options
For reference on all the available options please review the official documentation for TSLint.
Setup
First be sure to create a tslint.json file at the root of the project or in other words adjacent to the package.json.
PixelOven by default provides tslint-config-prettier for compatibility between TSLint and Prettier as well as tslint-eslint-rules to match rules against ESLint.
Usage
Once this has been confirmed all we have to do is run the following.
We can also target specific files.
TSLint options can be passed through the CLI but it is highly recommended that this behavior be managed with in a tslint.json file.