Skip to content

Commit

Permalink
chore: flat config/ESLint 9; change browser targets; lint; update dev…
Browse files Browse the repository at this point in the history
…Deps.
  • Loading branch information
brettz9 committed Aug 3, 2024
1 parent 5c4b99c commit e100846
Show file tree
Hide file tree
Showing 12 changed files with 2,140 additions and 1,586 deletions.
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

31 changes: 0 additions & 31 deletions .eslintrc.cjs

This file was deleted.

File renamed without changes.
4 changes: 2 additions & 2 deletions dist/index.cjs.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,9 @@ const commentHandler = settings => {
} = settings;
const selector = esquery.parse(commentSelector);
const ast = commentParserToESTree(jsdoc, mode);
const _ast = /** @type {unknown} */ast;
const castAst = /** @type {unknown} */ast;
return esquery.matches( /** @type {import('estree').Node} */
_ast, selector, undefined, {
castAst, selector, undefined, {
visitorKeys: {
...jsdocTypePrattParser.visitorKeys,
...jsdocVisitorKeys
Expand Down
36 changes: 36 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import ashNazg from 'eslint-config-ash-nazg';
import jsdoc from 'eslint-plugin-jsdoc';

export default [
{
ignores: [
'coverage',
'docs',
'dist',
'html'
]
},
...ashNazg(['sauron']),
...jsdoc.configs.examples,
// {
// files: ['**/*.md/*.js'],
// rules: {
// // Enable or disable rules for `@example` JavaScript here
// }
// },
{
files: ['test/**'],
languageOptions: {
globals: {
// Not chai
expect: 'readonly'
}
}
},
{
rules: {
// https://github.com/benmosher/eslint-plugin-import/issues/1868
'import/no-unresolved': 'off'
}
}
];
45 changes: 15 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
"require": "./dist/index.cjs.cjs"
},
"browserslist": [
"cover 100%"
"defaults, not op_mini all"
],
"scripts": {
"build": "rollup -c && npm run types",
"docs": "typedoc-pkg --api-link es",
"eslint": "eslint --ext=js,cjs,md,html .",
"eslint": "eslint .",
"lint": "npm run eslint --",
"open": "open ./coverage/index.html",
"prepublishOnly": "pnpm i && npm run build",
Expand Down Expand Up @@ -60,43 +60,28 @@
"jsdoc-type-pratt-parser": "~4.0.0"
},
"devDependencies": {
"@babel/core": "^7.24.7",
"@babel/core": "^7.25.2",
"@babel/plugin-syntax-class-properties": "^7.12.13",
"@babel/preset-env": "^7.24.7",
"@brettz9/eslint-plugin": "^1.0.4",
"@babel/preset-env": "^7.25.3",
"@rollup/plugin-babel": "^6.0.4",
"@types/eslint": "^8.56.10",
"@types/eslint": "^9.6.0",
"@types/esquery": "^1.5.4",
"@types/estraverse": "^5.1.7",
"@types/estree": "^1.0.5",
"@typescript-eslint/types": "^7.16.0",
"@typescript-eslint/visitor-keys": "^7.16.0",
"@typescript-eslint/types": "^8.0.0",
"@typescript-eslint/visitor-keys": "^8.0.0",
"@typhonjs-build-test/esm-d-ts": "0.3.0-next.1",
"@typhonjs-typedoc/typedoc-pkg": "^0.0.5",
"@vitest/coverage-v8": "^2.0.1",
"@vitest/ui": "^2.0.1",
"eslint": "^8.56.0",
"eslint-config-ash-nazg": "35.3.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-array-func": "^4.0.0",
"eslint-plugin-compat": "^4.2.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsdoc": "^48.0.4",
"eslint-plugin-markdown": "^3.0.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-no-unsanitized": "^4.0.2",
"eslint-plugin-no-use-extend-native": "^0.5.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-sonarjs": "^0.23.0",
"eslint-plugin-unicorn": "^50.0.1",
"@vitest/coverage-v8": "^2.0.5",
"@vitest/ui": "^2.0.5",
"eslint": "^9.8.0",
"eslint-config-ash-nazg": "36.9.0",
"espree": "^10.1.0",
"estraverse": "^5.3.0",
"rollup": "^4.18.1",
"typescript": "^5.5.3",
"typescript-eslint": "^7.16.0",
"vitest": "^2.0.1"
"rollup": "^4.20.0",
"typescript": "^5.5.4",
"typescript-eslint": "^8.0.0",
"vitest": "^2.0.5"
},
"files": [
"/dist",
Expand Down
Loading

0 comments on commit e100846

Please sign in to comment.