|
| 1 | +//// [tests/cases/compiler/moduleExportsTypeNoExcessPropertyCheckFromContainedLiteral.ts] //// |
| 2 | + |
| 3 | +=== eslint.config.js === |
| 4 | +const eslintReact = require('./eslint-plugin-react.js'); |
| 5 | +>eslintReact : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; }; } |
| 6 | +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 7 | +>require('./eslint-plugin-react.js') : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; }; } |
| 8 | +> : |
| 9 | +>require : any |
| 10 | +>'./eslint-plugin-react.js' : "./eslint-plugin-react.js" |
| 11 | +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 12 | + |
| 13 | +const tseslint = require('./typescript-eslint.js'); |
| 14 | +>tseslint : typeof tseslint |
| 15 | +> : ^^^^^^^^^^^^^^^ |
| 16 | +>require('./typescript-eslint.js') : typeof tseslint |
| 17 | +> : ^^^^^^^^^^^^^^^ |
| 18 | +>require : any |
| 19 | +>'./typescript-eslint.js' : "./typescript-eslint.js" |
| 20 | +> : ^^^^^^^^^^^^^^^^^^^^^^^^ |
| 21 | + |
| 22 | +tseslint.config(eslintReact) |
| 23 | +>tseslint.config(eslintReact) : void |
| 24 | +> : ^^^^ |
| 25 | +>tseslint.config : (...configs: tseslint.Config[]) => void |
| 26 | +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 27 | +>tseslint : typeof tseslint |
| 28 | +> : ^^^^^^^^^^^^^^^ |
| 29 | +>config : (...configs: tseslint.Config[]) => void |
| 30 | +> : ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 31 | +>eslintReact : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; }; } |
| 32 | +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 33 | + |
| 34 | +=== eslint-plugin-react.js === |
| 35 | +const deprecatedRules = { |
| 36 | +>deprecatedRules : { "jsx-sort-default-props": boolean; } |
| 37 | +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 38 | +>{ "jsx-sort-default-props": true} : { "jsx-sort-default-props": boolean; } |
| 39 | +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 40 | + |
| 41 | + "jsx-sort-default-props": true |
| 42 | +>"jsx-sort-default-props" : boolean |
| 43 | +> : ^^^^^^^ |
| 44 | +>true : true |
| 45 | +> : ^^^^ |
| 46 | +} |
| 47 | + |
| 48 | +const allRules = { |
| 49 | +>allRules : { 'no-unsafe': boolean; } |
| 50 | +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 51 | +>{ 'no-unsafe': true} : { 'no-unsafe': boolean; } |
| 52 | +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 53 | + |
| 54 | + 'no-unsafe': true |
| 55 | +>'no-unsafe' : boolean |
| 56 | +> : ^^^^^^^ |
| 57 | +>true : true |
| 58 | +> : ^^^^ |
| 59 | +} |
| 60 | + |
| 61 | +module.exports = { |
| 62 | +>module.exports = { plugins: { react: { deprecatedRules, rules: allRules, }, },} : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; }; } |
| 63 | +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 64 | +>module.exports : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; }; } |
| 65 | +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 66 | +>module : { exports: { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; }; }; } |
| 67 | +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 68 | +>exports : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; }; } |
| 69 | +> : ^^^^^^^^^^^ ^^^ |
| 70 | +>{ plugins: { react: { deprecatedRules, rules: allRules, }, },} : { plugins: { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; }; } |
| 71 | +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^ |
| 72 | + |
| 73 | + plugins: { |
| 74 | +>plugins : { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; } |
| 75 | +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 76 | +>{ react: { deprecatedRules, rules: allRules, }, } : { react: { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; }; } |
| 77 | +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^^^^ |
| 78 | + |
| 79 | + react: { |
| 80 | +>react : { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; } |
| 81 | +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 82 | +>{ deprecatedRules, rules: allRules, } : { deprecatedRules: { "jsx-sort-default-props": boolean; }; rules: { 'no-unsafe': boolean; }; } |
| 83 | +> : ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^^ |
| 84 | + |
| 85 | + deprecatedRules, |
| 86 | +>deprecatedRules : { "jsx-sort-default-props": boolean; } |
| 87 | +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 88 | + |
| 89 | + rules: allRules, |
| 90 | +>rules : { 'no-unsafe': boolean; } |
| 91 | +> : ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 92 | +>allRules : { 'no-unsafe': boolean; } |
| 93 | +> : |
| 94 | + |
| 95 | + }, |
| 96 | + }, |
| 97 | +}; |
| 98 | + |
| 99 | +=== typescript-eslint.js === |
| 100 | +/** |
| 101 | + * @typedef {{ rules: Record<string, boolean> }} Plugin |
| 102 | + */ |
| 103 | + |
| 104 | +/** |
| 105 | + * @typedef {{ plugins: Record<string, Plugin> }} Config |
| 106 | + */ |
| 107 | + |
| 108 | +/** |
| 109 | + * @type {(...configs: Config[]) => void} |
| 110 | + */ |
| 111 | +function config(...configs) { } |
| 112 | +>config : (...configs: Config[]) => void |
| 113 | +> : ^^^^ ^^ ^^^^^ |
| 114 | +>configs : Config[] |
| 115 | +> : ^^^^^^^^ |
| 116 | + |
| 117 | +module.exports = { config }; |
| 118 | +>module.exports = { config } : typeof module.exports |
| 119 | +> : ^^^^^^^^^^^^^^^^^^^^^ |
| 120 | +>module.exports : typeof module.exports |
| 121 | +> : ^^^^^^^^^^^^^^^^^^^^^ |
| 122 | +>module : { exports: typeof module.exports; } |
| 123 | +> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 124 | +>exports : typeof module.exports |
| 125 | +> : ^^^^^^^^^^^^^^^^^^^^^ |
| 126 | +>{ config } : { config: (...configs: Config[]) => void; } |
| 127 | +> : ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ |
| 128 | +>config : (...configs: Config[]) => void |
| 129 | +> : ^^^^ ^^^^^^^^^^^^^^^^^^^ |
| 130 | + |
0 commit comments