Skip to content

Commit de6de67

Browse files
refactor!: webpack v4 and nodejs v10 dropped (#238)
1 parent 1b73153 commit de6de67

File tree

12 files changed

+1441
-1878
lines changed

12 files changed

+1441
-1878
lines changed

.github/workflows/nodejs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ jobs:
5555
strategy:
5656
matrix:
5757
os: [ubuntu-latest, windows-latest, macos-latest]
58-
node-version: [10.x, 12.x, 14.x]
59-
webpack-version: [4, latest]
58+
node-version: [12.x, 14.x, 16.x]
59+
webpack-version: [latest]
6060

6161
runs-on: ${{ matrix.os }}
6262

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@
1313

1414
# stylelint-webpack-plugin
1515

16-
> A Stylelint plugin for webpack
16+
This plugin uses [`stylelint`](https://stylelint.io/) that helps you avoid errors and enforce conventions in your styles.
1717

18-
## Install
18+
## Getting Started
19+
20+
To begin, you'll need to install `stylelint-webpack-plugin`:
1921

2022
```bash
2123
npm install stylelint-webpack-plugin --save-dev
2224
```
2325

24-
**Note**: You also need to install `stylelint` from npm, if you haven't already:
26+
**Note**: You also need to install `stylelint >= 13` from npm, if you haven't already:
2527

2628
```bash
2729
npm install stylelint --save-dev
2830
```
2931

30-
## Usage
31-
32-
In your webpack configuration:
32+
Then add the plugin to your webpack config. For example:
3333

3434
```js
3535
const StylelintPlugin = require('stylelint-webpack-plugin');

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = (api) => {
1010
'@babel/preset-env',
1111
{
1212
targets: {
13-
node: '10.13.0',
13+
node: '12.13.0',
1414
},
1515
},
1616
],

declarations/index.d.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,4 @@ declare class StylelintWebpackPlugin {
3232
* @returns {string}
3333
*/
3434
getContext(compiler: Compiler): string;
35-
/**
36-
* @param {Compiler} compiler
37-
* @param {string[]} wanted
38-
* @param {string[]} exclude
39-
* @returns {string[]}
40-
*/
41-
getFiles(compiler: Compiler, wanted: string[], exclude: string[]): string[];
42-
/**
43-
* @param {Map<string, null | FileSystemInfoEntry | "ignore">} fileTimestamps
44-
* @returns {string[]}
45-
*/
46-
getChangedFiles(
47-
fileTimestamps: Map<string, 'ignore' | FileSystemInfoEntry | null>
48-
): string[];
4935
}

declarations/utils.d.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
/**
2-
* @param {string|(string|undefined)[]} files
2+
* @param {string|string[]} files
33
* @param {string} context
44
* @returns {string[]}
55
*/
6-
export function parseFiles(
7-
files: string | (string | undefined)[],
8-
context: string
9-
): string[];
6+
export function parseFiles(files: string | string[], context: string): string[];
107
/**
118
* @param {string|string[]} patterns
129
* @param {string|string[]} extensions

jest.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
collectCoverage: true,
3+
testEnvironment: 'node',
4+
testTimeout: 60000,
5+
transformIgnorePatterns: ['node_modules/(?!(arrify)/)'],
6+
};

0 commit comments

Comments
 (0)