Skip to content

Commit ee41284

Browse files
authored
Merge pull request #38 from adorade/develop
Prepare minor version
2 parents 1037010 + 996f85d commit ee41284

21 files changed

+201
-73
lines changed

.babelrc.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Gulp Stylelint (v2.1.0): .babelrc.cjs
2+
* Gulp Stylelint (v2.2.0): .babelrc.cjs
33
* Copyright (c) 2023-24 Adorade (https://github.com/adorade/gulp-stylelint-esm)
44
* License under MIT
55
* ========================================================================== */

.eslintrc.cjs

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
/*!
2-
* Gulp Stylelint (v2.1.0): .eslintrc.cjs
2+
* Gulp Stylelint (v2.2.0): .eslintrc.cjs
33
* Copyright (c) 2023-24 Adorade (https://github.com/adorade/gulp-stylelint-esm)
44
* License under MIT
55
* ========================================================================== */
66

77
module.exports = {
88
parser: "@babel/eslint-parser",
99
env: {
10-
browser: true,
1110
node: true,
1211
es6: true
1312
},
1413
extends: 'stylelint',
15-
globals: {
16-
module: true
17-
},
1814
parserOptions: {
1915
ecmaVersion: 2024,
2016
requireConfigFile: false,

.github/ISSUE_TEMPLATE/bug_report.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help improve gulp-stylelint-esm
4+
5+
---
6+
7+
### Describe the bug
8+
9+
A clear and concise description of what the bug is.
10+
11+
### To Reproduce
12+
13+
Steps to reproduce the behavior.
14+
15+
### Expected behavior
16+
17+
A clear and concise description of what you expected to happen.
18+
19+
### Screenshots
20+
21+
If applicable, add screenshots to help explain the bug.
22+
23+
### Additional context
24+
25+
- gulp-stylelint-esm version:
26+
- gulp and node version:
27+
- gulpfile or plugin configuration:
28+
29+
Add any other context about the bug here.
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for gulp-stylelint-esm
4+
5+
---
6+
7+
### Is your feature request related to a problem? Please describe.
8+
9+
A clear and concise description of what the problem is.
10+
11+
### Describe the solution you'd like
12+
13+
A clear and concise description of what you want to happen.
14+
15+
### Describe alternatives you've considered
16+
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
### Additional context
20+
21+
- gulp-stylelint-esm version:
22+
- gulp and node version:

.github/PULL_REQUEST_TEMPLATE.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
### Description
2+
3+
Please describe your pull request.
4+
5+
Fixes #
6+
7+
Before submitting pull request, please review the following checklist:
8+
9+
- [ ] Make sure you have read our [CONTRIBUTING.md](https://github.com/adorade/gulp-stylelint-esm/blob/main/CONTRIBUTING.md) document.
10+
- [ ] Every commit has a descriptive commit message.

CONTRIBUTING.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Contributing to gulp-stylelint-esm
2+
3+
As an open-source project, gulp-stylelint-esm welcomes contributions of many forms.
4+
5+
## Bug reporting or feature request
6+
7+
I appreciate your effort to improve **gulp-stylelint-esm** by submitting a bug report or feature request. Before doing so, please check the following things:
8+
9+
1. Check whether the bug you face **hasn't been already reported**. Checking for duplicate reports takes time that could be used to fix other bugs or make improvements.
10+
2. Prior to submitting a pull request, it is advisable to create an issue and await feedback.
11+
3. Specify the **gulp-stylelint-esm**, **gulp** information that may be helpful to fix the problem, especially exact **version numbers**.
12+
4. If you got some error, please **describe what happened**.
13+
5. Provide easy steps to reproduce.
14+
15+
Thanks for your help!
16+
17+
Please report [bugs on GitHub][1].
18+
19+
[1]: https://github.com/adorade/gulp-stylelint-esm/issues/new

README.md

+10-11
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,14 @@ npm install stylelint gulp-stylelint-esm --save-dev
2626

2727
## Quick start
2828

29-
Once you have [configured stylelint](https://stylelint.io/user-guide/configuration/) (e.g. you have a _.stylelintrc_ file), start with the following code. You will find additional configuration [options](#options) below.
29+
Once you have [configured stylelint](https://stylelint.io/user-guide/configuration/), start with the following code. You will find additional configuration [options](#options) below.
3030

3131
```js
32-
import gulp from 'gulp';
32+
import { src } from 'gulp';
3333
import gStylelintEsm from 'gulp-stylelint-esm';
3434

3535
function lintCssTask() {
36-
return gulp
37-
.src('src/**/*.css')
36+
return src('src/**/*.css')
3837
.pipe(gStylelintEsm({
3938
reporters: [
4039
{ formatter: 'string', console: true }
@@ -60,13 +59,12 @@ Formatters bundled with stylelint: `"compact"`, `"github"`, `"json"`, `"string (
6059
and accepts a **custom set of options** listed below:
6160

6261
```js
63-
import gulp from 'gulp';
62+
import { src } from 'gulp';
6463
import gStylelintEsm from 'gulp-stylelint-esm';
6564
import { myStylelintFormatter } from 'my-stylelint-formatter';
6665

6766
function lintCssTask() {
68-
return gulp
69-
.src('src/**/*.css')
67+
return src('src/**/*.css')
7068
.pipe(gStylelintEsm({
7169
failAfterError: true,
7270
reportOutputDir: 'reports/lint',
@@ -116,17 +114,18 @@ When set to `true`, the error handler will print an error stack trace. Defaults
116114

117115
The `fix: true` option instructs stylelint to try to fix as many issues as possible. The fixes are applied to the gulp stream. The fixed content can be saved to file using gulp `dest`.
118116

117+
> NOTE: Not all stylelint rules can be automatically fixed, so it's advisable to manually resolve errors.
118+
119119
```js
120-
import gulp from 'gulp';
120+
import { src, dest } from 'gulp';
121121
import gStylelintEsm from 'gulp-stylelint-esm';
122122

123123
function fixCssTask() {
124-
return gulp
125-
.src('src/**/*.css')
124+
return src('src/**/*.css')
126125
.pipe(gStylelintEsm({
127126
fix: true
128127
}))
129-
.pipe(gulp.dest('src'));
128+
.pipe(dest('src'));
130129
}
131130
```
132131

jest.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Gulp Stylelint (v2.1.0): jest.config.js
2+
* Gulp Stylelint (v2.2.0): jest.config.js
33
* Copyright (c) 2023-24 Adorade (https://github.com/adorade/gulp-stylelint-esm)
44
* License under MIT
55
* ========================================================================== */

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gulp-stylelint-esm",
3-
"version": "2.1.0",
3+
"version": "2.2.0",
44
"description": "Gulp plugin for stylelint with ES module support.",
55
"author": {
66
"name": "Adorade",
@@ -48,7 +48,7 @@
4848
"@babel/preset-env": "7.25.3",
4949
"babel-jest": "29.7.0",
5050
"eslint": "8.57.0",
51-
"eslint-config-stylelint": "21.0.0",
51+
"eslint-config-stylelint": "22.0.0",
5252
"gulp": "5.0.0",
5353
"gulp-clean-css": "4.3.0",
5454
"gulp-concat": "2.6.1",

src/apply-sourcemap.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Gulp Stylelint (v2.1.0): src/apply-sourcemap.mjs
2+
* Gulp Stylelint (v2.2.0): src/apply-sourcemap.mjs
33
* Copyright (c) 2023-24 Adorade (https://github.com/adorade/gulp-stylelint-esm)
44
* License under MIT
55
* ========================================================================== */

src/formatters.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Gulp Stylelint (v2.1.0): src/formatters.mjs
2+
* Gulp Stylelint (v2.2.0): src/formatters.mjs
33
* Copyright (c) 2023-24 Adorade (https://github.com/adorade/gulp-stylelint-esm)
44
* License under MIT
55
* ========================================================================== */

src/index.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Gulp Stylelint (v2.1.0): src/index.mjs
2+
* Gulp Stylelint (v2.2.0): src/index.mjs
33
* Copyright (c) 2023-24 Adorade (https://github.com/adorade/gulp-stylelint-esm)
44
* License under MIT
55
* ========================================================================== */

src/reporter-factory.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Gulp Stylelint (v2.1.0): src/reporter-factory.mjs
2+
* Gulp Stylelint (v2.2.0): src/reporter-factory.mjs
33
* Copyright (c) 2023-24 Adorade (https://github.com/adorade/gulp-stylelint-esm)
44
* License under MIT
55
* ========================================================================== */

src/writer.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Gulp Stylelint (v2.1.0): src/writer.mjs
2+
* Gulp Stylelint (v2.2.0): src/writer.mjs
33
* Copyright (c) 2023-24 Adorade (https://github.com/adorade/gulp-stylelint-esm)
44
* License under MIT
55
* ========================================================================== */

test/fail.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Gulp Stylelint (v2.1.0): test/fail-after-error.test.js
2+
* Gulp Stylelint (v2.2.0): test/fail-after-error.test.js
33
* Copyright (c) 2023-24 Adorade (https://github.com/adorade/gulp-stylelint-esm)
44
* License under MIT
55
* ========================================================================== */

test/formatters.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Gulp Stylelint (v2.1.0): test/formatters.test.js
2+
* Gulp Stylelint (v2.2.0): test/formatters.test.js
33
* Copyright (c) 2023-24 Adorade (https://github.com/adorade/gulp-stylelint-esm)
44
* License under MIT
55
* ========================================================================== */

test/index.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Gulp Stylelint (v2.1.0): test/index.test.js
2+
* Gulp Stylelint (v2.2.0): test/index.test.js
33
* Copyright (c) 2023-24 Adorade (https://github.com/adorade/gulp-stylelint-esm)
44
* License under MIT
55
* ========================================================================== */

test/reporter-factory.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Gulp Stylelint (v2.1.0): test/reporter-factory.test.js
2+
* Gulp Stylelint (v2.2.0): test/reporter-factory.test.js
33
* Copyright (c) 2023-24 Adorade (https://github.com/adorade/gulp-stylelint-esm)
44
* License under MIT
55
* ========================================================================== */

test/sourcemap.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Gulp Stylelint (v2.1.0): test/sourcemap.test.js
2+
* Gulp Stylelint (v2.2.0): test/sourcemap.test.js
33
* Copyright (c) 2023-24 Adorade (https://github.com/adorade/gulp-stylelint-esm)
44
* License under MIT
55
* ========================================================================== */

test/writer.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Gulp Stylelint (v2.1.0): test/writer.test.js
2+
* Gulp Stylelint (v2.2.0): test/writer.test.js
33
* Copyright (c) 2023-24 Adorade (https://github.com/adorade/gulp-stylelint-esm)
44
* License under MIT
55
* ========================================================================== */

0 commit comments

Comments
 (0)