Skip to content
Draft
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
253 changes: 141 additions & 112 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/eslint-config/esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const config = {
// https://gist.github.com/Jaid/164668c0151ae09d2bc81be78a203dd5
'import/no-commonjs': 'error',

'node/no-extraneous-import': 'error',
'n/no-extraneous-import': 'error',
'unicorn/prefer-module': 'error',
'unicorn/prefer-node-protocol': 'error',
},
Expand Down
16 changes: 8 additions & 8 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ const config = {
extends: [
'airbnb-base',
'eslint:recommended',
'plugin:eslint-comments/recommended',
'plugin:@eslint-community/eslint-comments/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:try-catch-failsafe/default',
'plugin:you-dont-need-lodash-underscore/compatible',
'prettier',
],
plugins: ['node', 'unicorn'],
plugins: ['n', 'unicorn'],
rules: {
'arrow-body-style': 'off', // This rule clashes with our Prettier config.
'@eslint-community/eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }],
'@eslint-community/eslint-comments/no-unused-disable': 'error',

'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }],
'eslint-comments/no-unused-disable': 'error',
'arrow-body-style': 'off', // This rule clashes with our Prettier config.

// This rule is enabled in our `typescript` config, eventually it will be enabled here as well.
'func-names': 'off',
Expand Down Expand Up @@ -50,9 +50,9 @@ const config = {
// acceptable.
'no-shadow': ['error', { allow: ['err'] }],

'node/no-deprecated-api': 'error',
'node/no-exports-assign': 'error',
'node/no-extraneous-require': 'error',
'n/no-deprecated-api': 'error',
'n/no-exports-assign': 'error',
'n/no-extraneous-require': 'error',

'prefer-arrow-callback': 'off', // This rule clashes with our Prettier config.
'prefer-destructuring': 'off',
Expand Down
9 changes: 4 additions & 5 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@readme/eslint-config",
"version": "14.7.2",
"version": "15.0.1-alpha.0",
"description": "ReadMe coding standards",
"main": "index.js",
"author": "Jon Ursenbach <[email protected]>",
Expand All @@ -14,27 +14,26 @@
},
"homepage": "https://github.com/readmeio/standards#readme",
"engines": {
"node": ">=18"
"node": ">=20"
},
"scripts": {
"lint": "eslint .",
"test": "tsc"
},
"dependencies": {
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
"@typescript-eslint/eslint-plugin": "^8.31.1",
"@typescript-eslint/parser": "^8.31.1",
"@typescript-eslint/utils": "^8.31.1",
"@vitest/eslint-plugin": "^1.1.44",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^10.1.2",
"eslint-import-resolver-typescript": "^4.3.4",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jest": "^28.3.0",
"eslint-plugin-jest-dom": "^5.2.0",
"eslint-plugin-jest-formatting": "^3.0.0",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-n": "^17.18.0",
"eslint-plugin-perfectionist": "^4.9.0",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config/testing/common.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import("eslint-define-config").ESLintConfig} */
const config = {
plugins: ['import', 'node'],
plugins: ['import', 'n'],
rules: {
// A failing `JSON.parse()` will fail the unit test it's in so it's safe to ignore.
'try-catch-failsafe/json-parse': 'off',
Expand All @@ -9,7 +9,7 @@ const config = {

'import/no-extraneous-dependencies': 'off',

'node/no-extraneous-require': 'off',
'n/no-extraneous-require': 'off',

// Sniff out tests that have useless `async` declarations. Since there's valid usecases for
// having a function be async and not return or await a Promise, we're only running this rule
Expand Down
12 changes: 11 additions & 1 deletion packages/eslint-config/testing/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,28 @@ const common = require('./common.config');

/** @type {import("eslint-define-config").ESLintConfig} */
const config = merge(common, {
extends: ['plugin:jest/recommended', 'plugin:jest/style', 'plugin:jest-formatting/recommended'],
extends: ['plugin:jest/recommended', 'plugin:jest/style'],
env: {
'jest/globals': true,
},
rules: {
'jest/consistent-test-it': ['warn', { fn: 'test', withinDescribe: 'it' }],

'jest/no-disabled-tests': 'off',
'jest/no-duplicate-hooks': 'warn',

'jest/padding-around-after-all-blocks': 'warn',
'jest/padding-around-after-each-blocks': 'warn',
'jest/padding-around-before-all-blocks': 'warn',
'jest/padding-around-before-each-blocks': 'warn',
'jest/padding-around-describe-blocks': 'warn',
'jest/padding-around-test-blocks': 'warn',

'jest/prefer-expect-resolves': 'warn',
'jest/prefer-hooks-on-top': 'warn',
'jest/prefer-strict-equal': 'error',
'jest/prefer-todo': 'warn',

'jest/require-to-throw-message': 'error',
},
});
Expand Down
6 changes: 0 additions & 6 deletions packages/eslint-plugin/.eslintrc

This file was deleted.

13 changes: 13 additions & 0 deletions packages/eslint-plugin/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import eslint from '@eslint/js';
import globals from 'globals';

/** @type {import("eslint-define-config").ESLintConfig} */
const config = {
languageOptions: {
globals: {
...globals.node,
},
},
};

export default [eslint.configs.recommended, config];
5 changes: 2 additions & 3 deletions packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-readme",
"version": "2.1.2",
"version": "3.0.0-alpha.0",
"description": "ESLint plugin providing custom rules for ReadMe's coding standards",
"main": "index.js",
"author": "Jon Ursenbach <[email protected]>",
Expand All @@ -15,7 +15,7 @@
},
"homepage": "https://github.com/readmeio/standards#readme",
"engines": {
"node": ">=18"
"node": ">=20"
},
"publishConfig": {
"access": "public"
Expand All @@ -30,7 +30,6 @@
},
"devDependencies": {
"@babel/eslint-parser": "^7.27.1",
"@readme/eslint-config": "file:../eslint-config",
"@typescript-eslint/parser": "^8.24.1",
"eslint-doc-generator": "^2.0.2",
"vitest": "^3.1.2"
Expand Down
4 changes: 2 additions & 2 deletions packages/spectral-config/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@readme/spectral-config",
"version": "5.0.16",
"version": "6.0.1-alpha.0",
"description": "ReadMe coding standards for API documentation",
"main": "dist/index.js",
"type": "module",
"engines": {
"node": ">=18"
"node": ">=20"
},
"scripts": {
"build": "tsup",
Expand Down
4 changes: 2 additions & 2 deletions packages/stylelint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@readme/stylelint-config",
"version": "7.1.2",
"version": "8.0.1-alpha.0",
"description": "ReadMe coding standards for styles",
"main": "src/index.js",
"scripts": {
"lint": "eslint .",
"test": "vitest run"
},
"engines": {
"node": ">=18"
"node": ">=20"
},
"repository": {
"type": "git",
Expand Down