File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load diff This file was deleted.
Original file line number Diff line number Diff line change 1- module . exports = {
2- rules : {
3- 'require-jsdoc' : 'off' ,
4- 'valid-jsdoc' : [ 'error' , {
5- prefer : {
6- arg : 'param' ,
7- argument : 'param' ,
8- extends : 'augments' ,
9- returns : 'return' ,
1+ /**
2+ * ESLint v10 flat config file for JSDoc linting.
3+ * This config is based on the original valid-jsdoc rules.
4+ */
5+
6+ const jsdocPlugin = require ( 'eslint-plugin-jsdoc' ) ;
7+
8+ module . exports = [
9+ {
10+ plugins : {
11+ jsdoc : jsdocPlugin ,
12+ } ,
13+ settings : {
14+ jsdoc : {
15+ tagNamePreference : {
16+ 'arg' : 'param' ,
17+ 'argument' : 'param' ,
18+ 'extends' : 'augments' ,
19+ 'returns' : 'return' ,
20+ } ,
21+ preferredTypes : {
22+ 'array' : 'Array' ,
23+ 'bool' : 'boolean' ,
24+ 'Boolean' : 'boolean' ,
25+ 'float' : 'number' ,
26+ 'Float' : 'number' ,
27+ 'function' : 'Function' ,
28+ 'int' : 'number' ,
29+ 'integer' : 'number' ,
30+ 'Integer' : 'number' ,
31+ 'Number' : 'number' ,
32+ 'object' : 'Object' ,
33+ 'String' : 'string' ,
34+ 'Void' : 'void' ,
35+ } ,
1036 } ,
11- preferType : {
12- array : 'Array' ,
13- bool : 'boolean' ,
14- Boolean : 'boolean' ,
15- float : 'number' ,
16- Float : 'number' ,
17- int : 'number' ,
18- integer : 'number' ,
19- Integer : 'number' ,
20- Number : 'number' ,
21- object : 'Object' ,
22- String : 'string' ,
23- Void : 'void' ,
24- } ,
25- requireParamDescription : false ,
26- requireReturn : false ,
27- } ] ,
37+ } ,
38+ rules : {
39+ 'jsdoc/check-param-names' : 'error' ,
40+ 'jsdoc/check-types' : 'error' ,
41+ 'jsdoc/check-tag-names' : [ 'error' , {
42+ definedTags : [
43+ 'memberOf' ,
44+ 'output' ,
45+ 'ticket' ,
46+ 'link' ,
47+ ] ,
48+ } ] ,
49+ 'jsdoc/require-param' : [ 'error' , {
50+ enableFixer : false ,
51+ } ] ,
52+ 'jsdoc/require-param-type' : 'error' ,
53+ 'jsdoc/require-returns-check' : 'error' ,
54+ 'jsdoc/require-returns-description' : 'error' ,
55+ 'jsdoc/require-returns' : 'error' ,
56+ 'jsdoc/require-returns-type' : 'error' ,
57+ 'jsdoc/check-syntax' : 'error' ,
58+ } ,
2859 } ,
29- } ;
60+ ] ;
Original file line number Diff line number Diff line change 1+ /**
2+ * ESLint v10 flat config entry point.
3+ *
4+ * This minimal config focuses only on JSDoc linting by importing
5+ * the configuration from .eslintrc-jsdoc.js.
6+ *
7+ * General JavaScript linting is not performed here.
8+ */
9+
10+ const jsdocConfig = require ( './.eslintrc-jsdoc.js' ) ;
11+
12+ module . exports = [
13+ ...jsdocConfig ,
14+ {
15+ ignores : [
16+ 'build/**' ,
17+ '**/build/**' ,
18+ 'node_modules/**' ,
19+ 'tests/**' ,
20+ 'vendor/**' ,
21+ 'tools/**' ,
22+ 'jsdoc/**' ,
23+ 'artifacts/**' ,
24+ 'coverage/**' ,
25+ '.cache/**' ,
26+ 'src/wp-includes/blocks/**/*.js' ,
27+ 'src/wp-includes/blocks/**/*.js.map' ,
28+ 'src/wp-content/themes/**' ,
29+ 'src/wp-content/plugins/**' ,
30+ 'src/wp-content/mu-plugins/**' ,
31+ 'src/wp-content/upgrade/**' ,
32+ 'src/wp-content/uploads/**' ,
33+ 'src/js/_enqueues/vendor/**' ,
34+ 'src/wp-admin/js/**' ,
35+ 'src/wp-includes/js/**' ,
36+ ] ,
37+ } ,
38+ ] ;
You can’t perform that action at this time.
0 commit comments