Skip to content

Commit

Permalink
Chore(CI): add tests for ESLint 8
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Oct 13, 2021
1 parent ecae4fe commit bce80e1
Show file tree
Hide file tree
Showing 4 changed files with 189 additions and 83 deletions.
40 changes: 20 additions & 20 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use strict";

var fs = require("fs");
var path = require("path");
var PACKAGE_NAME = require("./package").name;
var SYMLINK_LOCATION = path.join(__dirname, "node_modules", PACKAGE_NAME);
const fs = require("fs");
const path = require("path");
const PACKAGE_NAME = require("./package").name;
const SYMLINK_LOCATION = path.join(__dirname, "node_modules", PACKAGE_NAME);

// Symlink node_modules/eslint-plugin-markdown to this directory so that ESLint
// resolves this plugin name correctly.
Expand All @@ -12,37 +12,37 @@ if (!fs.existsSync(SYMLINK_LOCATION)) {
}

module.exports = {
"root": true,
root: true,

"parserOptions": {
"ecmaVersion": 2018
parserOptions: {
ecmaVersion: 2018
},

"plugins": [
plugins: [
PACKAGE_NAME
],

"env": {
"node": true
env: {
node: true
},

"extends": "eslint",
extends: "eslint",

"ignorePatterns": ["examples"],
ignorePatterns: ["examples"],

"overrides": [
overrides: [
{
"files": ["**/*.md"],
"processor": "markdown/markdown"
files: ["**/*.md"],
processor: "markdown/markdown"
},
{
"files": ["**/*.md/*.js"],
"parserOptions": {
"ecmaFeatures": {
"impliedStrict": true
files: ["**/*.md/*.js"],
parserOptions: {
ecmaFeatures: {
impliedStrict: true
}
},
"rules": {
rules: {
"lines-around-comment": "off"
}
}
Expand Down
34 changes: 25 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
- name: Install Packages
Expand All @@ -27,23 +27,39 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node-version: ["8.10.0", 8.x, 10.x, 12.x, 13.x, 14.x]
eslint: [6, 7, 8]
node: [8.10, 8, 10, 12, 14, 16]
exclude:
- eslint: 8
node: 10
- eslint: 8
node: 8
- eslint: 8
node: 8.10
- eslint: 7
node: 8
- eslint: 7
node: 8.10
include:
- os: windows-latest
node: "12.x"
- os: macOS-latest
node: "12.x"
- os: windows-latest
eslint: 8
node: 16
- os: macOS-latest
eslint: 8
node: 16
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/checkout@v2
- name: Install Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: ${{ matrix.node }}
- name: Install Packages
run: npm install
env:
CI: true
- name: Install ESLint@${{ matrix.eslint }}
run: npm install eslint@${{ matrix.eslint }}
- name: Test
run: npm run test-cov
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
],
"devDependencies": {
"chai": "^4.2.0",
"eslint": "^6.8.0",
"eslint-config-eslint": "^6.0.0",
"eslint-plugin-jsdoc": "^15.9.5",
"eslint-plugin-node": "^9.0.0",
"eslint": "^8.0.0",
"eslint-config-eslint": "^7.0.0",
"eslint-plugin-jsdoc": "^36.1.1",
"eslint-plugin-node": "^11.1.0",
"eslint-release": "^3.1.2",
"mocha": "^6.2.2",
"nyc": "^14.1.1"
Expand All @@ -50,9 +50,9 @@
"mdast-util-from-markdown": "^0.8.5"
},
"peerDependencies": {
"eslint": ">=6.0.0"
"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
},
"engines": {
"node": "^8.10.0 || ^10.12.0 || >= 12.0.0"
"node": "^8.10.0 || ^10.12.0 || >=12.0.0"
}
}
Loading

0 comments on commit bce80e1

Please sign in to comment.