Skip to content

Commit

Permalink
refactor!: webpack v4 and nodejs v10 dropped (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogobbosouza committed Jul 17, 2021
1 parent 1b73153 commit de6de67
Show file tree
Hide file tree
Showing 12 changed files with 1,441 additions and 1,878 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [10.x, 12.x, 14.x]
webpack-version: [4, latest]
node-version: [12.x, 14.x, 16.x]
webpack-version: [latest]

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

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@

# stylelint-webpack-plugin

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

## Install
## Getting Started

To begin, you'll need to install `stylelint-webpack-plugin`:

```bash
npm install stylelint-webpack-plugin --save-dev
```

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

```bash
npm install stylelint --save-dev
```

## Usage

In your webpack configuration:
Then add the plugin to your webpack config. For example:

```js
const StylelintPlugin = require('stylelint-webpack-plugin');
Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = (api) => {
'@babel/preset-env',
{
targets: {
node: '10.13.0',
node: '12.13.0',
},
},
],
Expand Down
14 changes: 0 additions & 14 deletions declarations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,4 @@ declare class StylelintWebpackPlugin {
* @returns {string}
*/
getContext(compiler: Compiler): string;
/**
* @param {Compiler} compiler
* @param {string[]} wanted
* @param {string[]} exclude
* @returns {string[]}
*/
getFiles(compiler: Compiler, wanted: string[], exclude: string[]): string[];
/**
* @param {Map<string, null | FileSystemInfoEntry | "ignore">} fileTimestamps
* @returns {string[]}
*/
getChangedFiles(
fileTimestamps: Map<string, 'ignore' | FileSystemInfoEntry | null>
): string[];
}
7 changes: 2 additions & 5 deletions declarations/utils.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
/**
* @param {string|(string|undefined)[]} files
* @param {string|string[]} files
* @param {string} context
* @returns {string[]}
*/
export function parseFiles(
files: string | (string | undefined)[],
context: string
): string[];
export function parseFiles(files: string | string[], context: string): string[];
/**
* @param {string|string[]} patterns
* @param {string|string[]} extensions
Expand Down
6 changes: 6 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
collectCoverage: true,
testEnvironment: 'node',
testTimeout: 60000,
transformIgnorePatterns: ['node_modules/(?!(arrify)/)'],
};

0 comments on commit de6de67

Please sign in to comment.