Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for 17.0.0 #40

Merged
merged 6 commits into from
Jul 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
labels:
- "dependency"
# Always increase the version requirement to match the new version.
versioning-strategy: increase

- package-ecosystem: "github-actions"
directory: "/"
ignore:
- dependency-name: "actions/*"
update-types:
["version-update:semver-minor", "version-update:semver-patch"]
schedule:
interval: "monthly"
labels:
- "github-actions"
35 changes: 14 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: 'ci'

on:
push:
Expand All @@ -7,33 +7,26 @@ on:
branches: [master]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 16.x]
fail-fast: false

ci:
runs-on: 'ubuntu-latest'
steps:
- name: Checkout project
uses: actions/checkout@v2
- uses: 'actions/checkout@v3'

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
- name: 'Use Node.js'
uses: 'actions/setup-node@v3'
with:
node-version: ${{ matrix.node-version }}
node-version: 'lts/*'

- name: Cache Node dependencies
uses: actions/cache@v2.1.5
- name: 'Cache Node dependencies'
uses: 'actions/cache@v3.0.1'
with:
path: ~/.npm
path: '~/.npm'
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Install dependencies
run: npm install
- name: 'Install dependencies'
run: 'npm install'

- name: Run tests
run: npm test
- name: 'Run tests'
run: 'npm test'
23 changes: 11 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
"url": "https://github.com/standard/eslint-config-semistandard/issues"
},
"devDependencies": {
"eslint": "^7.28.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"tap-spec": "^5.0.0",
"tape": "^5.0.0"
"eslint": "^8.13.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.0.0",
"eslint-plugin-promise": "^6.0.0",
"tape": "^5.5.3"
},
"homepage": "https://github.com/standard/eslint-config-semistandard",
"keywords": [
Expand Down Expand Up @@ -50,11 +49,11 @@
"index.js"
],
"peerDependencies": {
"eslint": ">=7.12.1",
"eslint-config-standard": ">=16.0.3",
"eslint-plugin-import": ">=2.22.1",
"eslint-plugin-node": ">=11.1.0",
"eslint-plugin-promise": ">=4.2.1"
"eslint": "^8.13.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.0.0",
"eslint-plugin-promise": "^6.0.0"
},
"repository": {
"type": "git",
Expand Down
12 changes: 6 additions & 6 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
'use strict';

const { CLIEngine } = require('eslint');
const { ESLint } = require('eslint');
const test = require('tape');

const configFile = require.resolve('../eslintrc.json');
const linter = new CLIEngine({ configFile });
const overrideConfigFile = require.resolve('../eslintrc.json');
const linter = new ESLint({ overrideConfigFile });

test('api: lintText', t => {
test('api: lintText', async t => {
t.plan(1);
const result = linter.executeOnText("console.log('hi there')\n\n");
t.equals(result.results[0].messages[0].message, 'Missing semicolon.');
const [result] = await linter.lintText("console.log('hi there')\n\n");
t.equal(result.messages[0].message, 'Missing semicolon.');
});