Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/electrovir/stylelint-plugin-import
Stylelint plugin for managing imports.
https://github.com/electrovir/stylelint-plugin-import
css extension filename import less plugin reference stylelint stylelint-plugin
Last synced: 4 months ago
JSON representation
Stylelint plugin for managing imports.
- Host: GitHub
- URL: https://github.com/electrovir/stylelint-plugin-import
- Owner: electrovir
- Created: 2020-06-26T13:27:22.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-16T20:00:36.000Z (12 months ago)
- Last Synced: 2024-10-05T04:24:26.691Z (4 months ago)
- Topics: css, extension, filename, import, less, plugin, reference, stylelint, stylelint-plugin
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/stylelint-plugin-import
- Size: 618 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stylelint Plugin Import
[![tests](https://github.com/electrovir/stylelint-plugin-import/actions/workflows/virmator-tests.yml/badge.svg?branch=master)](https://github.com/electrovir/stylelint-plugin-import/actions/workflows/virmator-tests.yml)
Stylelint plugin for managing imports.
# Rules
Go to each rule's page (click on the name below) to see specific details.
| Rule | auto-fix |
| ---------------------------------------------------------------------- | ----------- |
| [plugin-import/file-name-starts-with](src/rules/file-name-starts-with) | no ✗ |
| [plugin-import/import-as-reference](src/rules/import-as-reference) | yes ✓ |
| [plugin-import/file-extension](src/rules/file-extension) | yes ✓ |# Rule Options
All rules respect the following primary option format with _no_ secondary options:
- boolean input
```javascript
{
"rule-name": true // use default rule behavior
}
``````javascript
{
"rule-name": false // disables rule
}
```- object input
```javascript
{
"mode": "require" // requires the rule's default
}
``````javascript
{
"mode": "block" // blocks the rule's default
}
``````javascript
{
"mode": "off" // disable rule
}
```- object input with exceptions
```javascript
{
"mode": "require",
// optional input
// these use glob matching with globstar turned ON
"fileExceptions": [
"**/*colors.less", // ignores any files ending in colors.less in any directory
"*colors.less" // ignore files ending in colors.less only in the current directory
]
// optional input
// these use glob matching with globstar turned OFF
"lineExceptions": [
"*colors*", // ignores all lines that include the word colors
"@import 'colors'" // ignores all lines that are exactly this string (don't include semicolons)
],
}
```