Skip to content

Commit

Permalink
Merge pull request #45 from levibuzolic/support-eslint-v9
Browse files Browse the repository at this point in the history
Support ESLint v9
  • Loading branch information
levibuzolic committed Aug 15, 2024
2 parents 8fb57fc + 1daa41b commit 8416d33
Show file tree
Hide file tree
Showing 9 changed files with 856 additions and 904 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
node-version: [14, 16, 18]
node-version: [18, 20, 22]

steps:
- uses: actions/checkout@v2
Expand All @@ -18,6 +18,12 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn install
- name: TypeScript
run: yarn tsc
- name: ESLint
run: yarn eslint .
- name: Biome
run: yarn biome check
- name: Tests
run: yarn run test
env:
Expand Down
11 changes: 11 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": { "enabled": true },
"linter": {
"enabled": true,
"rules": { "recommended": true }
},
"formatter": {
"enabled": true
}
}
20 changes: 20 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const plugin = require("./index");
const js = require("@eslint/js");

/** @type {import('eslint').Linter.Config} */
module.exports = [
js.configs.recommended,
{
files: ["**/*.js"],
languageOptions: {
sourceType: "commonjs",
ecmaVersion: "latest",
},
plugins: {
"no-only-tests": plugin,
},
rules: {
"no-only-tests/no-only-tests": "error",
},
},
];
8 changes: 3 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

module.exports = {
rules: {
'no-only-tests': require('./rules/no-only-tests')
}
rules: {
"no-only-tests": require("./rules/no-only-tests"),
},
};
78 changes: 40 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,42 @@
{
"name": "eslint-plugin-no-only-tests",
"version": "3.2.0",
"description": "ESLint rule for .only blocks in mocha tests",
"keywords": [
"eslint",
"eslintplugin",
"eslint-plugin",
"mocha",
"rule",
"only",
"describe",
"it",
"fixture"
],
"author": "Levi Buzolic",
"main": "index.js",
"files": [
"index.js",
"rules/"
],
"scripts": {
"test": "node tests.js"
},
"devDependencies": {
"eslint": ">=3.0.0"
},
"engines": {
"node": ">=5.0.0"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "git@github.com:levibuzolic/eslint-plugin-no-only-tests.git"
},
"bugs": {
"url": "https://github.com/levibuzolic/no-only-tests/issues"
},
"homepage": "https://github.com/levibuzolic/no-only-tests#readme"
"name": "eslint-plugin-no-only-tests",
"version": "4.0.0",
"description": "ESLint rule for .only blocks in mocha tests",
"keywords": [
"eslint",
"eslintplugin",
"eslint-plugin",
"mocha",
"rule",
"only",
"describe",
"it",
"fixture"
],
"author": "Levi Buzolic",
"main": "index.js",
"files": ["index.js", "rules/"],
"scripts": {
"test": "node tests.js"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@types/eslint": "^9.6.0",
"@types/eslint__js": "^8.42.3",
"@types/node": "^22.3.0",
"eslint": ">=9.0.0",
"typescript": "^5.5.4"
},
"engines": {
"node": ">=5.0.0"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "git@github.com:levibuzolic/eslint-plugin-no-only-tests.git"
},
"bugs": {
"url": "https://github.com/levibuzolic/no-only-tests/issues"
},
"homepage": "https://github.com/levibuzolic/no-only-tests#readme"
}
Loading

0 comments on commit 8416d33

Please sign in to comment.