From a6bb438359ea0667900b7d60e2257bca74b3e0f9 Mon Sep 17 00:00:00 2001 From: Bret Comnes Date: Fri, 4 Oct 2024 12:39:25 -0700 Subject: [PATCH] Switch to neostandard --- eslint.config.js | 18 ++++++++++++++++++ package.json | 6 ++++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 eslint.config.js diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..8e6c786 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,18 @@ +'use strict' + +const neostandard = require('neostandard') +const mochaPlugin = require('eslint-plugin-mocha') + +const ignores = [ + 'coverage/**/*', + ...neostandard.resolveIgnoresFromGitignore() +] + +module.exports = [ + { ignores }, + ...neostandard(), + { + ...mochaPlugin.configs.flat.recommended, + ignores: ['**/*', '!test/**/*'], + }, +] diff --git a/package.json b/package.json index 7ab1651..d57abed 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "_mocha": "_mocha \"test/*.js\" --timeout 35000", "clean": "rm -rf .nyc_output coverage test-ws", "coverage": "nyc report -r lcov && opener coverage/lcov-report/index.html", - "lint": "standard", + "lint": "eslint", "test": "nyc --require @babel/register npm run -s _mocha", "watch": "npm run -s _mocha -- --require @babel/register --watch --growl" }, @@ -40,14 +40,16 @@ "@babel/register": "^7.5.5", "auto-changelog": "^2.2.0", "babel-preset-power-assert": "^3.0.0", + "eslint": "^9.11.1", + "eslint-plugin-mocha": "^10.5.0", "gh-release": "^7.0.2", "mocha": "^10.2.0", + "neostandard": "^0.11.6", "nyc": "17.0.0", "opener": "^1.5.1", "p-event": "^6.0.0", "power-assert": "^1.6.1", "shelljs": "^0.8.3", - "standard": "^17.1.0", "through": "^2.3.8" }, "repository": {