@nfq/eslint-config 4.0.0-beta.1 → 4.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/rules/common/plugins/stylistic.js +22 -1
- package/dist/esm/rules/common/plugins/stylistic.js.map +1 -1
- package/dist/esm/rules/custom/component-file-structure.js +132 -11
- package/dist/esm/rules/custom/component-file-structure.js.map +1 -1
- package/dist/esm/rules/custom/utils/component-file-structure-utils.js +182 -13
- package/dist/esm/rules/custom/utils/component-file-structure-utils.js.map +1 -1
- package/dist/esm/rules/custom/utils/component-utils.js +14 -0
- package/dist/esm/rules/custom/utils/component-utils.js.map +1 -1
- package/dist/esm/rules/react/plugins/react-hooks.js +2 -3
- package/dist/esm/rules/react/plugins/react-hooks.js.map +1 -1
- package/dist/esm/rules/react/plugins/react.js +2 -4
- package/dist/esm/rules/react/plugins/react.js.map +1 -1
- package/dist/esm/settings/plugins.js +0 -2
- package/dist/esm/settings/plugins.js.map +1 -1
- package/dist/esm/settings/tsPlugins.js +0 -2
- package/dist/esm/settings/tsPlugins.js.map +1 -1
- package/dist/index.js +352 -34
- package/dist/index.js.map +1 -1
- package/package.json +1 -2
- package/types/index.d.ts +69 -15
- package/types/rules/common/plugins/index.d.ts +22 -1
- package/types/rules/common/plugins/stylistic.d.ts +22 -1
- package/types/rules/custom/utils/component-file-structure-utils.d.ts +30 -1
- package/types/rules/react/plugins/index.d.ts +1 -4
- package/types/rules/react/plugins/react-hooks.d.ts +0 -1
- package/types/rules/react/plugins/react.d.ts +1 -3
- package/cypress/component/rules/component-file-structure.cy.ts +0 -80
- package/cypress/component/rules/component-single-hook.cy.ts +0 -124
- package/cypress/component/rules/cypress-mount-hook.cy.ts +0 -324
- package/cypress/component/rules/hexagonal-dependency-direction.cy.ts +0 -243
- package/cypress/component/rules/no-empty-lines-in-objects.cy.ts +0 -38
- package/cypress/component/rules/no-empty-lines-in-types.cy.ts +0 -38
- package/cypress/component/rules/no-magic-numbers.cy.ts +0 -75
- package/cypress/component/rules/no-unbound-method.cy.ts +0 -136
- package/cypress/component/rules/object-property-newline.cy.ts +0 -117
- package/cypress/component/rules/require-getcy.cy.ts +0 -56
- package/cypress/component/rules/sort-keys.cy.ts +0 -191
- package/cypress/component/rules/styled-components-order.cy.ts +0 -72
- package/cypress/fixtures/example.json +0 -5
- package/cypress/fixtures/rules/component-file-structure/invalid-missing-displayname.tsx +0 -13
- package/cypress/fixtures/rules/component-file-structure/invalid-missing-export.tsx +0 -13
- package/cypress/fixtures/rules/component-file-structure/invalid-props-after.tsx +0 -15
- package/cypress/fixtures/rules/component-file-structure/invalid-styled-before-export.tsx +0 -15
- package/cypress/fixtures/rules/component-file-structure/valid.tsx +0 -27
- package/cypress/fixtures/rules/component-single-hook/invalid-const-no-hook.tsx +0 -12
- package/cypress/fixtures/rules/component-single-hook/invalid-extra-const.tsx +0 -13
- package/cypress/fixtures/rules/component-single-hook/invalid-non-guard-if.tsx +0 -14
- package/cypress/fixtures/rules/component-single-hook/invalid-two-hooks.tsx +0 -13
- package/cypress/fixtures/rules/component-single-hook/valid-guard.tsx +0 -16
- package/cypress/fixtures/rules/component-single-hook/valid-no-hook.tsx +0 -8
- package/cypress/fixtures/rules/component-single-hook/valid-one-hook.tsx +0 -12
- package/cypress/fixtures/rules/component-single-hook/valid-ternary.tsx +0 -12
- package/cypress/fixtures/rules/component-single-hook/valid-wrapped.tsx +0 -12
- package/cypress/fixtures/rules/cypress-mount-hook/invalid-arg.tsx +0 -11
- package/cypress/fixtures/rules/cypress-mount-hook/invalid-assertion-first-then.tsx +0 -8
- package/cypress/fixtures/rules/cypress-mount-hook/invalid-extra-statement.tsx +0 -8
- package/cypress/fixtures/rules/cypress-mount-hook/invalid-hooks-arg.tsx +0 -11
- package/cypress/fixtures/rules/cypress-mount-hook/invalid-hooks-assertion-first-then.tsx +0 -8
- package/cypress/fixtures/rules/cypress-mount-hook/invalid-hooks-extra-statement.tsx +0 -8
- package/cypress/fixtures/rules/cypress-mount-hook/invalid-hooks-missing-mount-wrap.tsx +0 -7
- package/cypress/fixtures/rules/cypress-mount-hook/invalid-hooks-missing-second-then.tsx +0 -7
- package/cypress/fixtures/rules/cypress-mount-hook/invalid-hooks-missing-third-then-invoke.tsx +0 -9
- package/cypress/fixtures/rules/cypress-mount-hook/invalid-hooks-then-destructure.tsx +0 -7
- package/cypress/fixtures/rules/cypress-mount-hook/invalid-hooks-then-order.tsx +0 -9
- package/cypress/fixtures/rules/cypress-mount-hook/invalid-missing-mount-wrap.tsx +0 -7
- package/cypress/fixtures/rules/cypress-mount-hook/invalid-missing-second-then.tsx +0 -7
- package/cypress/fixtures/rules/cypress-mount-hook/invalid-missing-third-then-invoke.tsx +0 -9
- package/cypress/fixtures/rules/cypress-mount-hook/invalid-then-destructure.tsx +0 -7
- package/cypress/fixtures/rules/cypress-mount-hook/invalid-then-order.tsx +0 -9
- package/cypress/fixtures/rules/cypress-mount-hook/invalid-unwrapped-hook.tsx +0 -6
- package/cypress/fixtures/rules/cypress-mount-hook/valid-mount-hook-invoke.tsx +0 -11
- package/cypress/fixtures/rules/cypress-mount-hook/valid-mount-hook.tsx +0 -13
- package/cypress/fixtures/rules/cypress-mount-hook/valid-mount-hooks-invoke.tsx +0 -11
- package/cypress/fixtures/rules/cypress-mount-hook/valid-mount-hooks.tsx +0 -9
- package/cypress/fixtures/rules/hexagonal-dependency-direction/invalid-api-import.ts +0 -4
- package/cypress/fixtures/rules/hexagonal-dependency-direction/invalid-client-api-import.ts +0 -4
- package/cypress/fixtures/rules/hexagonal-dependency-direction/invalid-domain-import.ts +0 -4
- package/cypress/fixtures/rules/hexagonal-dependency-direction/invalid-service-import.ts +0 -4
- package/cypress/fixtures/rules/hexagonal-dependency-direction/invalid-service-no-class.ts +0 -2
- package/cypress/fixtures/rules/hexagonal-dependency-direction/invalid-service-no-implements.ts +0 -6
- package/cypress/fixtures/rules/hexagonal-dependency-direction/invalid-ui-import.ts +0 -4
- package/cypress/fixtures/rules/hexagonal-dependency-direction/valid-api.ts +0 -6
- package/cypress/fixtures/rules/hexagonal-dependency-direction/valid-client-service-api.ts +0 -9
- package/cypress/fixtures/rules/hexagonal-dependency-direction/valid-controller.ts +0 -7
- package/cypress/fixtures/rules/hexagonal-dependency-direction/valid-domain-config.ts +0 -4
- package/cypress/fixtures/rules/hexagonal-dependency-direction/valid-mobx-store.ts +0 -8
- package/cypress/fixtures/rules/hexagonal-dependency-direction/valid-service-implements.ts +0 -8
- package/cypress/fixtures/rules/hexagonal-dependency-direction/valid-ui.ts +0 -16
- package/cypress/fixtures/rules/no-empty-lines-in-objects/invalid.ts +0 -6
- package/cypress/fixtures/rules/no-empty-lines-in-objects/valid.ts +0 -5
- package/cypress/fixtures/rules/no-empty-lines-in-types/invalid.ts +0 -6
- package/cypress/fixtures/rules/no-empty-lines-in-types/valid.ts +0 -9
- package/cypress/fixtures/rules/no-magic-numbers/enforce-const.ts +0 -2
- package/cypress/fixtures/rules/no-magic-numbers/ignore-arrays.ts +0 -2
- package/cypress/fixtures/rules/no-magic-numbers/ignore-functions.ts +0 -3
- package/cypress/fixtures/rules/no-magic-numbers/invalid.ts +0 -2
- package/cypress/fixtures/rules/no-magic-numbers/valid.ts +0 -3
- package/cypress/fixtures/rules/no-unbound-method/arrow-wrapper.ts +0 -16
- package/cypress/fixtures/rules/no-unbound-method/assigned.ts +0 -13
- package/cypress/fixtures/rules/no-unbound-method/autobind.ts +0 -17
- package/cypress/fixtures/rules/no-unbound-method/bound-calls.ts +0 -18
- package/cypress/fixtures/rules/no-unbound-method/constructor-bind.ts +0 -12
- package/cypress/fixtures/rules/no-unbound-method/decorator-bound.ts +0 -17
- package/cypress/fixtures/rules/no-unbound-method/jsx-prop.tsx +0 -12
- package/cypress/fixtures/rules/no-unbound-method/no-this.ts +0 -14
- package/cypress/fixtures/rules/no-unbound-method/static-method.ts +0 -14
- package/cypress/fixtures/rules/no-unbound-method/unbound-arg.ts +0 -16
- package/cypress/fixtures/rules/object-property-newline/ignored-all.ts +0 -2
- package/cypress/fixtures/rules/object-property-newline/ignored-extra.ts +0 -2
- package/cypress/fixtures/rules/object-property-newline/ignored-some.ts +0 -2
- package/cypress/fixtures/rules/object-property-newline/invalid.ts +0 -2
- package/cypress/fixtures/rules/object-property-newline/valid.ts +0 -5
- package/cypress/fixtures/rules/require-getcy/invalid-data-cy.ts +0 -2
- package/cypress/fixtures/rules/require-getcy/invalid-selector.ts +0 -2
- package/cypress/fixtures/rules/require-getcy/valid-alias.ts +0 -2
- package/cypress/fixtures/rules/require-getcy/valid-commands.ts +0 -2
- package/cypress/fixtures/rules/require-getcy/valid-getcy.ts +0 -2
- package/cypress/fixtures/rules/sort-keys/case-insensitive.ts +0 -6
- package/cypress/fixtures/rules/sort-keys/desc.ts +0 -5
- package/cypress/fixtures/rules/sort-keys/ignore-prop-types.ts +0 -11
- package/cypress/fixtures/rules/sort-keys/ignored-extra.ts +0 -5
- package/cypress/fixtures/rules/sort-keys/ignored-only-invalid.ts +0 -6
- package/cypress/fixtures/rules/sort-keys/ignored-only.ts +0 -6
- package/cypress/fixtures/rules/sort-keys/ignored-subset.ts +0 -5
- package/cypress/fixtures/rules/sort-keys/invalid.ts +0 -5
- package/cypress/fixtures/rules/sort-keys/methods-extra.ts +0 -7
- package/cypress/fixtures/rules/sort-keys/natural.ts +0 -6
- package/cypress/fixtures/rules/sort-keys/valid.ts +0 -5
- package/cypress/fixtures/rules/styled-components-order/edgecase.tsx +0 -21
- package/cypress/fixtures/rules/styled-components-order/invalid.tsx +0 -17
- package/cypress/fixtures/rules/styled-components-order/no-jsx.tsx +0 -90
- package/cypress/fixtures/rules/styled-components-order/valid.tsx +0 -17
- package/cypress/reports/index.json +0 -108133
- package/cypress/reports/mochawesome.json +0 -352
- package/cypress/reports/mochawesome_001.json +0 -90
- package/cypress/reports/mochawesome_002.json +0 -757
- package/cypress/reports/mochawesome_003.json +0 -90
- package/cypress/reports/mochawesome_004.json +0 -90
- package/cypress/reports/mochawesome_005.json +0 -843
- package/cypress/reports/mochawesome_006.json +0 -296
- package/cypress/reports/mochawesome_007.json +0 -219
- package/cypress/reports/mochawesome_008.json +0 -105
- package/cypress/reports/mochawesome_009.json +0 -200
- package/cypress/reports/mochawesome_010.json +0 -181
- package/cypress/reports/mochawesome_011.json +0 -124
- package/cypress/reports/mochawesome_012.json +0 -352
- package/cypress/reports/mochawesome_013.json +0 -843
- package/cypress/reports/mochawesome_014.json +0 -757
- package/cypress/reports/mochawesome_015.json +0 -757
- package/cypress/reports/mochawesome_016.json +0 -90
- package/cypress/reports/mochawesome_017.json +0 -90
- package/cypress/reports/mochawesome_018.json +0 -296
- package/cypress/reports/mochawesome_019.json +0 -219
- package/cypress/reports/mochawesome_020.json +0 -124
- package/cypress/reports/mochawesome_021.json +0 -200
- package/cypress/reports/mochawesome_022.json +0 -181
- package/cypress/reports/mochawesome_023.json +0 -105
- package/cypress/reports/mochawesome_024.json +0 -352
- package/cypress/reports/mochawesome_025.json +0 -757
- package/cypress/reports/mochawesome_026.json +0 -757
- package/cypress/reports/mochawesome_027.json +0 -296
- package/cypress/reports/mochawesome_028.json +0 -90
- package/cypress/reports/mochawesome_029.json +0 -90
- package/cypress/reports/mochawesome_030.json +0 -843
- package/cypress/reports/mochawesome_031.json +0 -219
- package/cypress/reports/mochawesome_032.json +0 -124
- package/cypress/reports/mochawesome_033.json +0 -105
- package/cypress/reports/mochawesome_034.json +0 -200
- package/cypress/reports/mochawesome_035.json +0 -181
- package/cypress/reports/mochawesome_036.json +0 -352
- package/cypress/reports/mochawesome_037.json +0 -744
- package/cypress/reports/mochawesome_038.json +0 -739
- package/cypress/reports/mochawesome_039.json +0 -90
- package/cypress/reports/mochawesome_040.json +0 -90
- package/cypress/reports/mochawesome_041.json +0 -352
- package/cypress/reports/mochawesome_042.json +0 -739
- package/cypress/reports/mochawesome_043.json +0 -675
- package/cypress/reports/mochawesome_044.json +0 -757
- package/cypress/reports/mochawesome_045.json +0 -819
- package/cypress/reports/mochawesome_046.json +0 -574
- package/cypress/reports/mochawesome_047.json +0 -296
- package/cypress/reports/mochawesome_048.json +0 -124
- package/cypress/reports/mochawesome_049.json +0 -219
- package/cypress/reports/mochawesome_050.json +0 -200
- package/cypress/reports/mochawesome_051.json +0 -105
- package/cypress/reports/mochawesome_052.json +0 -181
- package/cypress/reports/mochawesome_053.json +0 -746
- package/cypress/reports/mochawesome_054.json +0 -819
- package/cypress/reports/mochawesome_055.json +0 -819
- package/cypress/reports/mochawesome_056.json +0 -105
- package/cypress/reports/mochawesome_057.json +0 -109
- package/cypress/reports/mochawesome_058.json +0 -109
- package/cypress/reports/mochawesome_059.json +0 -352
- package/cypress/reports/mochawesome_060.json +0 -739
- package/cypress/reports/mochawesome_061.json +0 -675
- package/cypress/reports/mochawesome_062.json +0 -757
- package/cypress/reports/mochawesome_063.json +0 -783
- package/cypress/reports/mochawesome_064.json +0 -90
- package/cypress/reports/mochawesome_065.json +0 -296
- package/cypress/reports/mochawesome_066.json +0 -219
- package/cypress/reports/mochawesome_067.json +0 -105
- package/cypress/reports/mochawesome_068.json +0 -124
- package/cypress/reports/mochawesome_069.json +0 -200
- package/cypress/reports/mochawesome_070.json +0 -181
- package/cypress/reports/mochawesome_071.json +0 -90
- package/cypress/reports/mochawesome_072.json +0 -746
- package/cypress/reports/mochawesome_073.json +0 -746
- package/cypress/reports/mochawesome_074.json +0 -723
- package/cypress/reports/mochawesome_075.json +0 -723
- package/cypress/reports/mochawesome_076.json +0 -723
- package/cypress/reports/mochawesome_077.json +0 -570
- package/cypress/reports/mochawesome_078.json +0 -739
- package/cypress/reports/mochawesome_079.json +0 -723
- package/cypress/reports/mochawesome_080.json +0 -746
- package/cypress/reports/mochawesome_081.json +0 -783
- package/cypress/reports/mochawesome_082.json +0 -570
- package/cypress/reports/mochawesome_083.json +0 -352
- package/cypress/reports/mochawesome_084.json +0 -296
- package/cypress/reports/mochawesome_085.json +0 -219
- package/cypress/reports/mochawesome_086.json +0 -105
- package/cypress/reports/mochawesome_087.json +0 -124
- package/cypress/reports/mochawesome_088.json +0 -200
- package/cypress/reports/mochawesome_089.json +0 -181
- package/cypress/reports/mochawesome_090.json +0 -90
- package/cypress/reports/mochawesome_091.json +0 -90
- package/cypress/reports/mochawesome_092.json +0 -723
- package/cypress/reports/mochawesome_093.json +0 -723
- package/cypress/reports/mochawesome_094.json +0 -352
- package/cypress/reports/mochawesome_095.json +0 -739
- package/cypress/reports/mochawesome_096.json +0 -723
- package/cypress/reports/mochawesome_097.json +0 -746
- package/cypress/reports/mochawesome_098.json +0 -783
- package/cypress/reports/mochawesome_099.json +0 -570
- package/cypress/reports/mochawesome_100.json +0 -296
- package/cypress/reports/mochawesome_101.json +0 -219
- package/cypress/reports/mochawesome_102.json +0 -124
- package/cypress/reports/mochawesome_103.json +0 -105
- package/cypress/reports/mochawesome_104.json +0 -200
- package/cypress/reports/mochawesome_105.json +0 -181
- package/cypress/reports/mochawesome_106.json +0 -296
- package/cypress/reports/mochawesome_107.json +0 -143
- package/cypress/reports/mochawesome_108.json +0 -352
- package/cypress/reports/mochawesome_109.json +0 -219
- package/cypress/reports/mochawesome_110.json +0 -314
- package/cypress/reports/mochawesome_111.json +0 -105
- package/cypress/reports/mochawesome_112.json +0 -200
- package/cypress/reports/mochawesome_113.json +0 -90
- package/cypress/reports/mochawesome_114.json +0 -124
- package/cypress/reports/mochawesome_115.json +0 -181
- package/cypress/reports/mochawesome_116.json +0 -162
- package/cypress/reports/mochawesome_117.json +0 -238
- package/cypress/reports/mochawesome_118.json +0 -295
- package/cypress/reports/mochawesome_119.json +0 -295
- package/cypress/reports/mochawesome_120.json +0 -296
- package/cypress/reports/mochawesome_121.json +0 -143
- package/cypress/reports/mochawesome_122.json +0 -90
- package/cypress/reports/mochawesome_123.json +0 -219
- package/cypress/reports/mochawesome_124.json +0 -314
- package/cypress/reports/mochawesome_125.json +0 -200
- package/cypress/reports/mochawesome_126.json +0 -105
- package/cypress/reports/mochawesome_127.json +0 -90
- package/cypress/reports/mochawesome_128.json +0 -124
- package/cypress/reports/mochawesome_129.json +0 -181
- package/cypress/reports/mochawesome_130.json +0 -162
- package/cypress/reports/mochawesome_131.json +0 -238
- package/cypress/reports/mochawesome_132.json +0 -295
- package/cypress/reports/mochawesome_133.json +0 -295
- package/cypress/reports/mochawesome_134.json +0 -90
- package/cypress/reports/mochawesome_135.json +0 -109
- package/cypress/reports/mochawesome_136.json +0 -109
- package/cypress/reports/mochawesome_137.json +0 -109
- package/cypress/reports/mochawesome_138.json +0 -105
- package/cypress/reports/mochawesome_139.json +0 -257
- package/cypress/reports/mochawesome_140.json +0 -124
- package/cypress/reports/mochawesome_141.json +0 -124
- package/cypress/reports/mochawesome_142.json +0 -132
- package/cypress/reports/mochawesome_143.json +0 -257
- package/cypress/reports/mochawesome_144.json +0 -124
- package/cypress/reports/mochawesome_145.json +0 -124
- package/cypress/reports/mochawesome_146.json +0 -124
- package/cypress/reports/mochawesome_147.json +0 -124
- package/cypress/reports/mochawesome_148.json +0 -124
- package/cypress/reports/mochawesome_149.json +0 -257
- package/cypress/reports/mochawesome_150.json +0 -124
- package/cypress/reports/mochawesome_151.json +0 -124
- package/cypress/reports/mochawesome_152.json +0 -124
- package/cypress/reports/mochawesome_153.json +0 -124
- package/cypress/reports/mochawesome_154.json +0 -124
- package/cypress/reports/mochawesome_155.json +0 -257
- package/cypress/reports/mochawesome_156.json +0 -124
- package/cypress/reports/mochawesome_157.json +0 -124
- package/cypress/reports/mochawesome_158.json +0 -143
- package/cypress/reports/mochawesome_159.json +0 -132
- package/cypress/reports/mochawesome_160.json +0 -132
- package/cypress/reports/mochawesome_161.json +0 -124
- package/cypress/reports/mochawesome_162.json +0 -132
- package/cypress/reports/mochawesome_163.json +0 -132
- package/cypress/reports/mochawesome_164.json +0 -132
- package/cypress/reports/mochawesome_165.json +0 -132
- package/cypress/reports/mochawesome_166.json +0 -129
- package/cypress/reports/mochawesome_167.json +0 -129
- package/cypress/reports/mochawesome_168.json +0 -124
- package/cypress/reports/mochawesome_169.json +0 -124
- package/cypress/reports/mochawesome_170.json +0 -129
- package/cypress/reports/mochawesome_171.json +0 -129
- package/cypress/reports/mochawesome_172.json +0 -129
- package/cypress/reports/mochawesome_173.json +0 -129
- package/cypress/reports/mochawesome_174.json +0 -129
- package/cypress/reports/mochawesome_175.json +0 -124
- package/cypress/reports/mochawesome_176.json +0 -124
- package/cypress/reports/mochawesome_177.json +0 -124
- package/cypress/reports/mochawesome_178.json +0 -124
- package/cypress/reports/mochawesome_179.json +0 -90
- package/cypress/reports/mochawesome_180.json +0 -129
- package/cypress/reports/mochawesome_181.json +0 -129
- package/cypress/reports/mochawesome_182.json +0 -124
- package/cypress/reports/mochawesome_183.json +0 -124
- package/cypress/reports/mochawesome_184.json +0 -124
- package/cypress/reports/mochawesome_185.json +0 -124
- package/cypress/reports/mochawesome_186.json +0 -90
- package/cypress/reports/mochawesome_187.json +0 -124
- package/cypress/reports/mochawesome_188.json +0 -124
- package/cypress/reports/mochawesome_189.json +0 -124
- package/cypress/reports/mochawesome_190.json +0 -124
- package/cypress/reports/mochawesome_191.json +0 -124
- package/cypress/reports/mochawesome_192.json +0 -124
- package/cypress/reports/mochawesome_193.json +0 -129
- package/cypress/reports/mochawesome_194.json +0 -124
- package/cypress/reports/mochawesome_195.json +0 -124
- package/cypress/reports/mochawesome_196.json +0 -124
- package/cypress/reports/mochawesome_197.json +0 -124
- package/cypress/reports/mochawesome_198.json +0 -124
- package/cypress/reports/mochawesome_199.json +0 -124
- package/cypress/reports/mochawesome_200.json +0 -129
- package/cypress/reports/mochawesome_201.json +0 -124
- package/cypress/reports/mochawesome_202.json +0 -124
- package/cypress/reports/mochawesome_203.json +0 -124
- package/cypress/reports/mochawesome_204.json +0 -124
- package/cypress/reports/mochawesome_205.json +0 -124
- package/cypress/reports/mochawesome_206.json +0 -124
- package/cypress/reports/mochawesome_207.json +0 -124
- package/cypress/reports/mochawesome_208.json +0 -129
- package/cypress/reports/mochawesome_209.json +0 -129
- package/cypress/reports/mochawesome_210.json +0 -124
- package/cypress/reports/mochawesome_211.json +0 -124
- package/cypress/reports/mochawesome_212.json +0 -124
- package/cypress/reports/mochawesome_213.json +0 -124
- package/cypress/reports/mochawesome_214.json +0 -124
- package/cypress/reports/mochawesome_215.json +0 -124
- package/cypress/reports/mochawesome_216.json +0 -124
- package/cypress/reports/mochawesome_217.json +0 -124
- package/cypress/reports/mochawesome_218.json +0 -124
- package/cypress/reports/mochawesome_219.json +0 -124
- package/cypress/reports/mochawesome_220.json +0 -124
- package/cypress/reports/mochawesome_221.json +0 -124
- package/cypress/reports/mochawesome_222.json +0 -124
- package/cypress/reports/mochawesome_223.json +0 -124
- package/cypress/reports/mochawesome_224.json +0 -124
- package/cypress/reports/mochawesome_225.json +0 -124
- package/cypress/reports/mochawesome_226.json +0 -124
- package/cypress/reports/mochawesome_227.json +0 -124
- package/cypress/reports/mochawesome_228.json +0 -124
- package/cypress/reports/mochawesome_229.json +0 -124
- package/cypress/reports/mochawesome_230.json +0 -129
- package/cypress/reports/mochawesome_231.json +0 -124
- package/cypress/reports/mochawesome_232.json +0 -124
- package/cypress/reports/mochawesome_233.json +0 -124
- package/cypress/reports/mochawesome_234.json +0 -124
- package/cypress/reports/mochawesome_235.json +0 -124
- package/cypress/reports/mochawesome_236.json +0 -124
- package/cypress/reports/mochawesome_237.json +0 -124
- package/cypress/reports/mochawesome_238.json +0 -162
- package/cypress/reports/mochawesome_239.json +0 -143
- package/cypress/reports/mochawesome_240.json +0 -143
- package/cypress/reports/mochawesome_241.json +0 -143
- package/cypress/reports/mochawesome_242.json +0 -124
- package/cypress/reports/mochawesome_243.json +0 -124
- package/cypress/reports/mochawesome_244.json +0 -124
- package/cypress/reports/mochawesome_245.json +0 -162
- package/cypress/reports/mochawesome_246.json +0 -276
- package/cypress/reports/mochawesome_247.json +0 -143
- package/cypress/reports/mochawesome_248.json +0 -219
- package/cypress/reports/mochawesome_249.json +0 -124
- package/cypress/reports/mochawesome_250.json +0 -124
- package/cypress/reports/mochawesome_251.json +0 -124
- package/cypress/reports/mochawesome_252.json +0 -181
- package/cypress/reports/mochawesome_253.json +0 -276
- package/cypress/reports/mochawesome_254.json +0 -205
- package/cypress/reports/mochawesome_255.json +0 -295
- package/cypress/reports/mochawesome_256.json +0 -124
- package/cypress/reports/mochawesome_257.json +0 -124
- package/cypress/reports/mochawesome_258.json +0 -124
- package/cypress/reports/mochawesome_259.json +0 -181
- package/cypress/reports/mochawesome_260.json +0 -276
- package/cypress/reports/mochawesome_261.json +0 -209
- package/cypress/reports/mochawesome_262.json +0 -295
- package/cypress/reports/mochawesome_263.json +0 -124
- package/cypress/reports/mochawesome_264.json +0 -124
- package/cypress/reports/mochawesome_265.json +0 -124
- package/cypress/reports/mochawesome_266.json +0 -181
- package/cypress/reports/mochawesome_267.json +0 -276
- package/cypress/reports/mochawesome_268.json +0 -200
- package/cypress/reports/mochawesome_269.json +0 -295
- package/cypress/reports/mochawesome_270.json +0 -124
- package/cypress/reports/mochawesome_271.json +0 -181
- package/cypress/reports/mochawesome_272.json +0 -257
- package/cypress/reports/mochawesome_273.json +0 -124
- package/cypress/reports/mochawesome_274.json +0 -124
- package/cypress/reports/mochawesome_275.json +0 -181
- package/cypress/reports/mochawesome_276.json +0 -276
- package/cypress/reports/mochawesome_277.json +0 -200
- package/cypress/reports/mochawesome_278.json +0 -295
- package/cypress/reports/mochawesome_279.json +0 -124
- package/cypress/reports/mochawesome_280.json +0 -181
- package/cypress/reports/mochawesome_281.json +0 -257
- package/cypress/reports/mochawesome_282.json +0 -124
- package/cypress/reports/mochawesome_283.json +0 -124
- package/cypress/reports/mochawesome_284.json +0 -181
- package/cypress/reports/mochawesome_285.json +0 -276
- package/cypress/reports/mochawesome_286.json +0 -200
- package/cypress/reports/mochawesome_287.json +0 -295
- package/cypress/reports/mochawesome_288.json +0 -143
- package/cypress/reports/mochawesome_289.json +0 -181
- package/cypress/reports/mochawesome_290.json +0 -257
- package/cypress/reports/mochawesome_291.json +0 -124
- package/cypress/reports/mochawesome_292.json +0 -124
- package/cypress/reports/mochawesome_293.json +0 -181
- package/cypress/reports/mochawesome_294.json +0 -276
- package/cypress/reports/mochawesome_295.json +0 -200
- package/cypress/reports/mochawesome_296.json +0 -124
- package/cypress/reports/mochawesome_297.json +0 -295
- package/cypress/reports/mochawesome_298.json +0 -143
- package/cypress/reports/mochawesome_299.json +0 -181
- package/cypress/reports/mochawesome_300.json +0 -257
- package/cypress/reports/mochawesome_301.json +0 -251
- package/cypress/reports/mochawesome_302.json +0 -124
- package/cypress/reports/mochawesome_303.json +0 -124
- package/cypress/reports/mochawesome_304.json +0 -181
- package/cypress/reports/mochawesome_305.json +0 -276
- package/cypress/reports/mochawesome_306.json +0 -200
- package/cypress/reports/mochawesome_307.json +0 -124
- package/cypress/reports/mochawesome_308.json +0 -295
- package/cypress/reports/mochawesome_309.json +0 -143
- package/cypress/reports/mochawesome_310.json +0 -181
- package/cypress/reports/mochawesome_311.json +0 -257
- package/cypress/reports/mochawesome_312.json +0 -238
- package/cypress/reports/mochawesome_313.json +0 -124
- package/cypress/reports/mochawesome_314.json +0 -124
- package/cypress/reports/mochawesome_315.json +0 -181
- package/cypress/reports/mochawesome_316.json +0 -276
- package/cypress/reports/mochawesome_317.json +0 -200
- package/cypress/reports/mochawesome_318.json +0 -124
- package/cypress/reports/mochawesome_319.json +0 -295
- package/cypress/reports/mochawesome_320.json +0 -143
- package/cypress/reports/mochawesome_321.json +0 -181
- package/cypress/reports/mochawesome_322.json +0 -257
- package/cypress/reports/mochawesome_323.json +0 -238
- package/cypress/reports/mochawesome_324.json +0 -124
- package/cypress/reports/mochawesome_325.json +0 -124
- package/cypress/reports/mochawesome_326.json +0 -181
- package/cypress/reports/mochawesome_327.json +0 -276
- package/cypress/reports/mochawesome_328.json +0 -200
- package/cypress/reports/mochawesome_329.json +0 -143
- package/cypress/reports/mochawesome_330.json +0 -295
- package/cypress/reports/mochawesome_331.json +0 -143
- package/cypress/reports/mochawesome_332.json +0 -181
- package/cypress/reports/mochawesome_333.json +0 -257
- package/cypress/reports/mochawesome_334.json +0 -352
- package/cypress/reports/mochawesome_335.json +0 -132
- package/cypress/reports/mochawesome_336.json +0 -124
- package/cypress/reports/mochawesome_337.json +0 -124
- package/cypress/reports/mochawesome_338.json +0 -181
- package/cypress/reports/mochawesome_339.json +0 -276
- package/cypress/reports/mochawesome_340.json +0 -219
- package/cypress/reports/mochawesome_341.json +0 -143
- package/cypress/reports/mochawesome_342.json +0 -295
- package/cypress/reports/mochawesome_343.json +0 -143
- package/cypress/reports/mochawesome_344.json +0 -181
- package/cypress/reports/mochawesome_345.json +0 -257
- package/cypress/reports/mochawesome_346.json +0 -352
- package/cypress/reports/mochawesome_347.json +0 -408
- package/cypress/reports/mochawesome_348.json +0 -124
- package/cypress/reports/mochawesome_349.json +0 -124
- package/cypress/reports/mochawesome_350.json +0 -181
- package/cypress/reports/mochawesome_351.json +0 -276
- package/cypress/reports/mochawesome_352.json +0 -201
- package/cypress/reports/mochawesome_353.json +0 -293
- package/cypress/reports/mochawesome_354.json +0 -408
- package/cypress/reports/mochawesome_355.json +0 -431
- package/cypress/reports/mochawesome_356.json +0 -132
- package/cypress/reports/mochawesome_357.json +0 -132
- package/cypress/reports/mochawesome_358.json +0 -201
- package/cypress/reports/mochawesome_359.json +0 -316
- package/cypress/reports/mochawesome_360.json +0 -247
- package/cypress/reports/mochawesome_361.json +0 -155
- package/cypress/reports/mochawesome_362.json +0 -339
- package/cypress/reports/mochawesome_363.json +0 -155
- package/cypress/reports/mochawesome_364.json +0 -201
- package/cypress/reports/mochawesome_365.json +0 -293
- package/cypress/reports/mochawesome_366.json +0 -408
- package/cypress/reports/mochawesome_367.json +0 -431
- package/cypress/reports/mochawesome_368.json +0 -132
- package/cypress/reports/mochawesome_369.json +0 -132
- package/cypress/reports/mochawesome_370.json +0 -201
- package/cypress/reports/mochawesome_371.json +0 -181
- package/cypress/reports/mochawesome_372.json +0 -257
- package/cypress/reports/mochawesome_373.json +0 -352
- package/cypress/reports/mochawesome_374.json +0 -404
- package/cypress/reports/mochawesome_375.json +0 -124
- package/cypress/reports/mochawesome_376.json +0 -124
- package/cypress/reports/mochawesome_377.json +0 -181
- package/cypress/reports/mochawesome_378.json +0 -276
- package/cypress/reports/mochawesome_379.json +0 -219
- package/cypress/reports/mochawesome_380.json +0 -143
- package/cypress/reports/mochawesome_381.json +0 -295
- package/cypress/reports/mochawesome_382.json +0 -143
- package/cypress/reports/mochawesome_383.json +0 -181
- package/cypress/reports/mochawesome_384.json +0 -257
- package/cypress/reports/mochawesome_385.json +0 -352
- package/cypress/reports/mochawesome_386.json +0 -371
- package/cypress/reports/mochawesome_387.json +0 -124
- package/cypress/reports/mochawesome_388.json +0 -124
- package/cypress/reports/mochawesome_389.json +0 -181
- package/cypress/reports/mochawesome_390.json +0 -276
- package/cypress/reports/mochawesome_391.json +0 -219
- package/cypress/reports/mochawesome_392.json +0 -143
- package/cypress/reports/mochawesome_393.json +0 -295
- package/cypress/reports/mochawesome_394.json +0 -143
- package/cypress/reports/mochawesome_395.json +0 -181
- package/cypress/reports/mochawesome_396.json +0 -257
- package/cypress/reports/mochawesome_397.json +0 -352
- package/cypress/reports/mochawesome_398.json +0 -371
- package/cypress/reports/mochawesome_399.json +0 -124
- package/cypress/reports/mochawesome_400.json +0 -124
- package/cypress/reports/mochawesome_401.json +0 -181
- package/cypress/reports/mochawesome_402.json +0 -276
- package/cypress/reports/mochawesome_403.json +0 -219
- package/cypress/reports/mochawesome_404.json +0 -143
- package/cypress/reports/mochawesome_405.json +0 -295
- package/cypress/reports/mochawesome_406.json +0 -143
- package/cypress/reports/mochawesome_407.json +0 -181
- package/cypress/reports/mochawesome_408.json +0 -257
- package/cypress/reports/mochawesome_409.json +0 -352
- package/cypress/reports/mochawesome_410.json +0 -371
- package/cypress/reports/mochawesome_411.json +0 -124
- package/cypress/reports/mochawesome_412.json +0 -124
- package/cypress/reports/mochawesome_413.json +0 -181
- package/cypress/reports/mochawesome_414.json +0 -289
- package/cypress/reports/mochawesome_415.json +0 -219
- package/cypress/reports/mochawesome_416.json +0 -143
- package/cypress/reports/mochawesome_417.json +0 -295
- package/cypress/reports/mochawesome_418.json +0 -143
- package/cypress/reports/mochawesome_419.json +0 -181
- package/cypress/reports/mochawesome_420.json +0 -257
- package/cypress/reports/mochawesome_421.json +0 -352
- package/cypress/reports/mochawesome_422.json +0 -371
- package/cypress/reports/mochawesome_423.json +0 -124
- package/cypress/reports/mochawesome_424.json +0 -124
- package/cypress/reports/mochawesome_425.json +0 -181
- package/cypress/reports/mochawesome_426.json +0 -276
- package/cypress/reports/mochawesome_427.json +0 -219
- package/cypress/reports/mochawesome_428.json +0 -143
- package/cypress/reports/mochawesome_429.json +0 -295
- package/cypress/reports/mochawesome_430.json +0 -143
- package/cypress/reports/mochawesome_431.json +0 -181
- package/cypress/reports/mochawesome_432.json +0 -257
- package/cypress/reports/mochawesome_433.json +0 -352
- package/cypress/reports/mochawesome_434.json +0 -371
- package/cypress/reports/mochawesome_435.json +0 -124
- package/cypress/reports/mochawesome_436.json +0 -124
- package/cypress/reports/mochawesome_437.json +0 -181
- package/cypress/reports/mochawesome_438.json +0 -276
- package/cypress/reports/mochawesome_439.json +0 -219
- package/cypress/reports/mochawesome_440.json +0 -143
- package/cypress/reports/mochawesome_441.json +0 -295
- package/cypress/reports/mochawesome_442.json +0 -143
- package/cypress/reports/mochawesome_443.json +0 -181
- package/cypress/reports/mochawesome_444.json +0 -257
- package/cypress/reports/mochawesome_445.json +0 -352
- package/cypress/reports/mochawesome_446.json +0 -371
- package/cypress/reports/mochawesome_447.json +0 -124
- package/cypress/reports/mochawesome_448.json +0 -124
- package/cypress/reports/mochawesome_449.json +0 -181
- package/cypress/reports/mochawesome_450.json +0 -276
- package/cypress/reports/mochawesome_451.json +0 -181
- package/cypress/reports/mochawesome_452.json +0 -257
- package/cypress/reports/mochawesome_453.json +0 -352
- package/cypress/reports/mochawesome_454.json +0 -371
- package/cypress/reports/mochawesome_455.json +0 -124
- package/cypress/reports/mochawesome_456.json +0 -124
- package/cypress/reports/mochawesome_457.json +0 -181
- package/cypress/reports/mochawesome_458.json +0 -276
- package/cypress/reports/mochawesome_459.json +0 -219
- package/cypress/reports/mochawesome_460.json +0 -143
- package/cypress/reports/mochawesome_461.json +0 -295
- package/cypress/reports/mochawesome_462.json +0 -143
- package/cypress/reports/mochawesome_463.json +0 -181
- package/cypress/reports/mochawesome_464.json +0 -257
- package/cypress/reports/mochawesome_465.json +0 -461
- package/cypress/reports/mochawesome_466.json +0 -371
- package/cypress/reports/mochawesome_467.json +0 -124
- package/cypress/reports/mochawesome_468.json +0 -124
- package/cypress/reports/mochawesome_469.json +0 -181
- package/cypress/reports/mochawesome_470.json +0 -276
- package/cypress/reports/mochawesome_471.json +0 -219
- package/cypress/reports/mochawesome_472.json +0 -143
- package/cypress/reports/mochawesome_473.json +0 -295
- package/cypress/reports/mochawesome_474.json +0 -143
- package/cypress/reports/mochawesome_475.json +0 -181
- package/cypress/reports/mochawesome_476.json +0 -257
- package/cypress/reports/mochawesome_477.json +0 -428
- package/cypress/reports/mochawesome_478.json +0 -371
- package/cypress/reports/mochawesome_479.json +0 -124
- package/cypress/reports/mochawesome_480.json +0 -124
- package/cypress/reports/mochawesome_481.json +0 -181
- package/cypress/reports/mochawesome_482.json +0 -276
- package/cypress/reports/mochawesome_483.json +0 -219
- package/cypress/reports/mochawesome_484.json +0 -143
- package/cypress/reports/mochawesome_485.json +0 -295
- package/cypress/reports/mochawesome_486.json +0 -143
- package/cypress/reports/mochawesome_487.json +0 -181
- package/cypress/reports/mochawesome_488.json +0 -257
- package/cypress/reports/mochawesome_489.json +0 -428
- package/cypress/reports/mochawesome_490.json +0 -371
- package/cypress/reports/mochawesome_491.json +0 -124
- package/cypress/reports/mochawesome_492.json +0 -124
- package/cypress/reports/mochawesome_493.json +0 -181
- package/cypress/reports/mochawesome_494.json +0 -276
- package/cypress/reports/mochawesome_495.json +0 -219
- package/cypress/reports/mochawesome_496.json +0 -143
- package/cypress/reports/mochawesome_497.json +0 -295
- package/cypress/reports/mochawesome_498.json +0 -143
- package/cypress/reports/mochawesome_499.json +0 -181
- package/cypress/reports/mochawesome_500.json +0 -257
- package/cypress/reports/mochawesome_501.json +0 -428
- package/cypress/reports/mochawesome_502.json +0 -371
- package/cypress/reports/mochawesome_503.json +0 -124
- package/cypress/reports/mochawesome_504.json +0 -124
- package/cypress/reports/mochawesome_505.json +0 -181
- package/cypress/reports/mochawesome_506.json +0 -276
- package/cypress/reports/mochawesome_507.json +0 -219
- package/cypress/reports/mochawesome_508.json +0 -143
- package/cypress/reports/mochawesome_509.json +0 -295
- package/cypress/reports/mochawesome_510.json +0 -143
- package/cypress/reports/mochawesome_511.json +0 -181
- package/cypress/reports/mochawesome_512.json +0 -257
- package/cypress/reports/mochawesome_513.json +0 -428
- package/cypress/reports/mochawesome_514.json +0 -371
- package/cypress/reports/mochawesome_515.json +0 -124
- package/cypress/reports/mochawesome_516.json +0 -124
- package/cypress/reports/mochawesome_517.json +0 -181
- package/cypress/reports/mochawesome_518.json +0 -276
- package/cypress/reports/mochawesome_519.json +0 -219
- package/cypress/reports/mochawesome_520.json +0 -143
- package/cypress/reports/mochawesome_521.json +0 -295
- package/cypress/reports/mochawesome_522.json +0 -143
- package/cypress/reports/mochawesome_523.json +0 -181
- package/cypress/reports/mochawesome_524.json +0 -257
- package/cypress/reports/mochawesome_525.json +0 -497
- package/cypress/reports/mochawesome_526.json +0 -392
- package/cypress/reports/mochawesome_527.json +0 -124
- package/cypress/reports/mochawesome_528.json +0 -124
- package/cypress/reports/mochawesome_529.json +0 -181
- package/cypress/reports/mochawesome_530.json +0 -276
- package/cypress/reports/mochawesome_531.json +0 -219
- package/cypress/reports/mochawesome_532.json +0 -143
- package/cypress/reports/mochawesome_533.json +0 -295
- package/cypress/reports/mochawesome_534.json +0 -143
- package/cypress/reports/mochawesome_535.json +0 -181
- package/cypress/reports/mochawesome_536.json +0 -257
- package/cypress/reports/mochawesome_537.json +0 -500
- package/cypress/reports/mochawesome_538.json +0 -392
- package/cypress/reports/mochawesome_539.json +0 -124
- package/cypress/reports/mochawesome_540.json +0 -124
- package/cypress/reports/mochawesome_541.json +0 -181
- package/cypress/reports/mochawesome_542.json +0 -276
- package/cypress/reports/mochawesome_543.json +0 -219
- package/cypress/reports/mochawesome_544.json +0 -143
- package/cypress/reports/mochawesome_545.json +0 -295
- package/cypress/reports/mochawesome_546.json +0 -143
- package/cypress/reports/mochawesome_547.json +0 -181
- package/cypress/reports/mochawesome_548.json +0 -257
- package/cypress/reports/mochawesome_549.json +0 -500
- package/cypress/reports/mochawesome_550.json +0 -392
- package/cypress/reports/mochawesome_551.json +0 -124
- package/cypress/reports/mochawesome_552.json +0 -124
- package/cypress/reports/mochawesome_553.json +0 -181
- package/cypress/reports/mochawesome_554.json +0 -276
- package/cypress/reports/mochawesome_555.json +0 -219
- package/cypress/reports/mochawesome_556.json +0 -143
- package/cypress/reports/mochawesome_557.json +0 -295
- package/cypress/reports/mochawesome_558.json +0 -143
- package/cypress/reports/mochawesome_559.json +0 -181
- package/cypress/reports/mochawesome_560.json +0 -257
- package/cypress/reports/mochawesome_561.json +0 -428
- package/cypress/reports/mochawesome_562.json +0 -392
- package/cypress/reports/mochawesome_563.json +0 -124
- package/cypress/reports/mochawesome_564.json +0 -124
- package/cypress/reports/mochawesome_565.json +0 -181
- package/cypress/reports/mochawesome_566.json +0 -276
- package/cypress/reports/mochawesome_567.json +0 -181
- package/cypress/reports/mochawesome_568.json +0 -257
- package/cypress/reports/mochawesome_569.json +0 -428
- package/cypress/reports/mochawesome_570.json +0 -371
- package/cypress/reports/mochawesome_571.json +0 -124
- package/cypress/reports/mochawesome_572.json +0 -124
- package/cypress/reports/mochawesome_573.json +0 -181
- package/cypress/reports/mochawesome_574.json +0 -276
- package/cypress/reports/mochawesome_575.json +0 -219
- package/cypress/reports/mochawesome_576.json +0 -143
- package/cypress/reports/mochawesome_577.json +0 -295
- package/cypress/reports/mochawesome_578.json +0 -143
- package/cypress/support/commands.ts +0 -77
- package/cypress/support/component-index.html +0 -12
- package/cypress/support/component.ts +0 -32
- package/cypress/support/index.d.ts +0 -60
- package/cypress/support/tasks.ts +0 -200
|
@@ -135,7 +135,28 @@ const stylistic = {
|
|
|
135
135
|
overrides: {}
|
|
136
136
|
}],
|
|
137
137
|
'@stylistic/object-curly-newline': ['error', {
|
|
138
|
-
|
|
138
|
+
ExportDeclaration: {
|
|
139
|
+
consistent: true
|
|
140
|
+
},
|
|
141
|
+
ImportDeclaration: {
|
|
142
|
+
consistent: true
|
|
143
|
+
},
|
|
144
|
+
ObjectExpression: {
|
|
145
|
+
minProperties: 2,
|
|
146
|
+
multiline: true
|
|
147
|
+
},
|
|
148
|
+
ObjectPattern: {
|
|
149
|
+
consistent: true
|
|
150
|
+
},
|
|
151
|
+
TSEnumBody: {
|
|
152
|
+
consistent: true
|
|
153
|
+
},
|
|
154
|
+
TSInterfaceBody: {
|
|
155
|
+
consistent: true
|
|
156
|
+
},
|
|
157
|
+
TSTypeLiteral: {
|
|
158
|
+
consistent: true
|
|
159
|
+
}
|
|
139
160
|
}],
|
|
140
161
|
'@stylistic/object-curly-spacing': ['error', 'never'],
|
|
141
162
|
'@stylistic/object-property-newline': 'off',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stylistic.js","sources":["../../../../../src/rules/common/plugins/stylistic.ts"],"sourcesContent":["export const stylistic = {\n '@stylistic/array-bracket-newline': ['error', 'consistent'],\n '@stylistic/array-bracket-spacing': ['error', 'never'],\n '@stylistic/array-element-newline': ['error', 'consistent'],\n '@stylistic/arrow-parens': ['error', 'as-needed'],\n '@stylistic/arrow-spacing': ['error', {\n after: true,\n before: true\n }],\n '@stylistic/block-spacing': ['error', 'never'],\n '@stylistic/brace-style': ['error', '1tbs', {allowSingleLine: false}],\n '@stylistic/comma-dangle': ['error', 'never'],\n '@stylistic/comma-spacing': ['error', {\n after: true,\n before: false\n }],\n '@stylistic/comma-style': [\n 'error',\n 'last',\n {\n exceptions: {\n ArrayExpression: false,\n ArrayPattern: false,\n ArrowFunctionExpression: false,\n CallExpression: false,\n FunctionDeclaration: false,\n FunctionExpression: false,\n ImportDeclaration: false,\n NewExpression: false,\n ObjectExpression: false,\n ObjectPattern: false,\n VariableDeclaration: false\n }\n }\n ],\n '@stylistic/computed-property-spacing': ['error', 'never'],\n '@stylistic/dot-location': ['error', 'property'],\n '@stylistic/eol-last': ['error', 'never'],\n '@stylistic/function-call-argument-newline': ['error', 'consistent'],\n '@stylistic/function-call-spacing': ['error', 'never'],\n '@stylistic/function-paren-newline': ['error', 'consistent'],\n '@stylistic/generator-star-spacing': ['error', {\n after: true,\n before: false\n }],\n '@stylistic/implicit-arrow-linebreak': ['error', 'beside'],\n '@stylistic/indent': [\n 'error',\n 4,\n {\n ArrayExpression: 'first',\n CallExpression: {arguments: 'first'},\n flatTernaryExpressions: false,\n FunctionDeclaration: {\n body: 1,\n parameters: 'first'\n },\n FunctionExpression: {\n body: 1,\n parameters: 'first'\n },\n ignoreComments: false,\n ignoredNodes: [\n 'JSXElement',\n 'JSXElement > *',\n 'JSXAttribute',\n 'JSXIdentifier',\n 'JSXNamespacedName',\n 'JSXMemberExpression',\n 'JSXSpreadAttribute',\n 'JSXExpressionContainer',\n 'JSXOpeningElement',\n 'JSXClosingElement',\n 'JSXFragment',\n 'JSXOpeningFragment',\n 'JSXClosingFragment',\n 'JSXText',\n 'JSXEmptyExpression',\n 'JSXSpreadChild'\n ],\n ImportDeclaration: 'first',\n ObjectExpression: 'first',\n outerIIFEBody: 1,\n SwitchCase: 1,\n VariableDeclarator: 'first'\n }\n ],\n '@stylistic/indent-binary-ops': ['error', 4],\n '@stylistic/jsx-quotes': ['error', 'prefer-double'],\n '@stylistic/key-spacing': [\n 'error',\n {\n afterColon: true,\n beforeColon: false,\n mode: 'minimum'\n }\n ],\n '@stylistic/keyword-spacing': ['error', {\n after: true,\n before: true\n }],\n '@stylistic/line-comment-position': [\n 'off',\n {\n applyDefaultPatterns: true,\n ignorePattern: '',\n position: 'above'\n }\n ],\n '@stylistic/linebreak-style': ['error', 'unix'],\n '@stylistic/lines-around-comment': 'off',\n '@stylistic/lines-between-class-members': [\n 'error',\n 'always',\n {exceptAfterSingleLine: false}\n ],\n '@stylistic/max-len': [\n 'error',\n {\n code: 120,\n ignoreComments: true,\n ignoreRegExpLiterals: true,\n ignoreTemplateLiterals: true,\n ignoreUrls: true\n }\n ],\n '@stylistic/max-statements-per-line': ['error', {max: 1}],\n '@stylistic/member-delimiter-style': [\n 'error',\n {\n multiline: {\n delimiter: 'semi',\n requireLast: true\n },\n multilineDetection: 'brackets',\n singleline: {\n delimiter: 'semi',\n requireLast: false\n }\n }\n ],\n '@stylistic/multiline-ternary': ['off', 'never'],\n '@stylistic/new-parens': ['error', 'always'],\n '@stylistic/newline-per-chained-call': ['error', {ignoreChainWithDepth: 4}],\n '@stylistic/no-confusing-arrow': ['error', {allowParens: true}],\n '@stylistic/no-extra-parens': 'off',\n '@stylistic/no-extra-semi': 'error',\n '@stylistic/no-floating-decimal': 'error',\n '@stylistic/no-mixed-operators': [\n 'error',\n {\n allowSamePrecedence: false,\n groups: [\n ['%', '**'],\n ['%', '+'],\n ['%', '-'],\n ['%', '*'],\n ['%', '/'],\n ['/', '*'],\n ['&', '|', '<<', '>>', '>>>'],\n ['==', '!=', '===', '!=='],\n ['&&', '||']\n ]\n }\n ],\n '@stylistic/no-mixed-spaces-and-tabs': 'error',\n '@stylistic/no-multi-spaces': 'error',\n '@stylistic/no-multiple-empty-lines': ['error', {\n max: 1,\n maxBOF: 0,\n maxEOF: 0\n }],\n '@stylistic/no-tabs': 'error',\n '@stylistic/no-trailing-spaces': 'error',\n '@stylistic/no-whitespace-before-property': 'error',\n '@stylistic/nonblock-statement-body-position': ['error', 'beside', {overrides: {}}],\n '@stylistic/object-curly-newline': ['error', {multiline: true}],\n '@stylistic/object-curly-spacing': ['error', 'never'],\n '@stylistic/object-property-newline': 'off',\n '@stylistic/one-var-declaration-per-line': ['error', 'always'],\n '@stylistic/operator-linebreak': ['error', 'before'],\n '@stylistic/padded-blocks': ['error', 'never'],\n '@stylistic/padding-line-between-statements': [\n 'error',\n {\n blankLine: 'always',\n next: '*',\n prev: ['const', 'let', 'var']\n },\n {\n blankLine: 'any',\n next: ['const', 'let', 'var'],\n prev: ['const', 'let', 'var']\n },\n {\n blankLine: 'always',\n next: '*',\n prev: 'directive'\n },\n {\n blankLine: 'any',\n next: 'directive',\n prev: 'directive'\n },\n {\n blankLine: 'always',\n next: 'return',\n prev: '*'\n }\n ],\n '@stylistic/quote-props': [\n 'error',\n 'as-needed',\n {\n keywords: false,\n numbers: false,\n unnecessary: true\n }\n ],\n '@stylistic/quotes': ['error', 'single', {avoidEscape: true}],\n '@stylistic/rest-spread-spacing': ['error', 'never'],\n '@stylistic/semi': ['error', 'always'],\n '@stylistic/semi-spacing': ['error', {\n after: true,\n before: false\n }],\n '@stylistic/semi-style': ['error', 'last'],\n '@stylistic/space-before-blocks': ['error', 'always'],\n '@stylistic/space-before-function-paren': [\n 'error',\n {\n anonymous: 'never',\n asyncArrow: 'always',\n named: 'never'\n }\n ],\n '@stylistic/space-in-parens': ['error', 'never'],\n '@stylistic/space-infix-ops': 'error',\n '@stylistic/space-unary-ops': [\n 'error',\n {\n nonwords: false,\n overrides: {},\n words: true\n }\n ],\n '@stylistic/spaced-comment': [\n 'error',\n 'always',\n {\n block: {\n balanced: true,\n exceptions: ['-', '+'],\n markers: ['=', '!', ':', '::']\n },\n line: {\n exceptions: ['-', '+'],\n markers: ['=', '!', '/']\n }\n }\n ],\n '@stylistic/switch-colon-spacing': ['error', {\n after: true,\n before: false\n }],\n '@stylistic/template-curly-spacing': ['error', 'never'],\n '@stylistic/template-tag-spacing': ['error', 'never'],\n '@stylistic/type-annotation-spacing': 'error',\n '@stylistic/type-generic-spacing': 'error',\n '@stylistic/type-named-tuple-spacing': 'error',\n '@stylistic/wrap-iife': ['error', 'outside', {functionPrototypeMethods: false}],\n '@stylistic/wrap-regex': 'error',\n '@stylistic/yield-star-spacing': ['error', 'after']\n};"],"names":["stylistic","after","before","allowSingleLine","exceptions","ArrayExpression","ArrayPattern","ArrowFunctionExpression","CallExpression","FunctionDeclaration","FunctionExpression","ImportDeclaration","NewExpression","ObjectExpression","ObjectPattern","VariableDeclaration","arguments","flatTernaryExpressions","body","parameters","ignoreComments","ignoredNodes","outerIIFEBody","SwitchCase","VariableDeclarator","afterColon","beforeColon","mode","applyDefaultPatterns","ignorePattern","position","exceptAfterSingleLine","code","ignoreRegExpLiterals","ignoreTemplateLiterals","ignoreUrls","max","multiline","delimiter","requireLast","multilineDetection","singleline","ignoreChainWithDepth","allowParens","allowSamePrecedence","groups","maxBOF","maxEOF","overrides","blankLine","next","prev","keywords","numbers","unnecessary","avoidEscape","anonymous","asyncArrow","named","nonwords","words","block","balanced","markers","line","functionPrototypeMethods"],"mappings":"AAAO,MAAMA,SAAS,GAAG;AACrB,EAAA,kCAAkC,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC;AAC3D,EAAA,kCAAkC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;AACtD,EAAA,kCAAkC,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC;AAC3D,EAAA,yBAAyB,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC;EACjD,0BAA0B,EAAE,CAAC,OAAO,EAAE;AAClCC,IAAAA,KAAK,EAAE,IAAI;AACXC,IAAAA,MAAM,EAAE;AACZ,GAAC,CAAC;AACF,EAAA,0BAA0B,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;AAC9C,EAAA,wBAAwB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE;AAACC,IAAAA,eAAe,EAAE;AAAK,GAAC,CAAC;AACrE,EAAA,yBAAyB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;EAC7C,0BAA0B,EAAE,CAAC,OAAO,EAAE;AAClCF,IAAAA,KAAK,EAAE,IAAI;AACXC,IAAAA,MAAM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src/rules/common/plugins/stylistic.ts"],"sourcesContent":["export const stylistic = {\n '@stylistic/array-bracket-newline': ['error', 'consistent'],\n '@stylistic/array-bracket-spacing': ['error', 'never'],\n '@stylistic/array-element-newline': ['error', 'consistent'],\n '@stylistic/arrow-parens': ['error', 'as-needed'],\n '@stylistic/arrow-spacing': ['error', {\n after: true,\n before: true\n }],\n '@stylistic/block-spacing': ['error', 'never'],\n '@stylistic/brace-style': ['error', '1tbs', {allowSingleLine: false}],\n '@stylistic/comma-dangle': ['error', 'never'],\n '@stylistic/comma-spacing': ['error', {\n after: true,\n before: false\n }],\n '@stylistic/comma-style': [\n 'error',\n 'last',\n {\n exceptions: {\n ArrayExpression: false,\n ArrayPattern: false,\n ArrowFunctionExpression: false,\n CallExpression: false,\n FunctionDeclaration: false,\n FunctionExpression: false,\n ImportDeclaration: false,\n NewExpression: false,\n ObjectExpression: false,\n ObjectPattern: false,\n VariableDeclaration: false\n }\n }\n ],\n '@stylistic/computed-property-spacing': ['error', 'never'],\n '@stylistic/dot-location': ['error', 'property'],\n '@stylistic/eol-last': ['error', 'never'],\n '@stylistic/function-call-argument-newline': ['error', 'consistent'],\n '@stylistic/function-call-spacing': ['error', 'never'],\n '@stylistic/function-paren-newline': ['error', 'consistent'],\n '@stylistic/generator-star-spacing': ['error', {\n after: true,\n before: false\n }],\n '@stylistic/implicit-arrow-linebreak': ['error', 'beside'],\n '@stylistic/indent': [\n 'error',\n 4,\n {\n ArrayExpression: 'first',\n CallExpression: {arguments: 'first'},\n flatTernaryExpressions: false,\n FunctionDeclaration: {\n body: 1,\n parameters: 'first'\n },\n FunctionExpression: {\n body: 1,\n parameters: 'first'\n },\n ignoreComments: false,\n ignoredNodes: [\n 'JSXElement',\n 'JSXElement > *',\n 'JSXAttribute',\n 'JSXIdentifier',\n 'JSXNamespacedName',\n 'JSXMemberExpression',\n 'JSXSpreadAttribute',\n 'JSXExpressionContainer',\n 'JSXOpeningElement',\n 'JSXClosingElement',\n 'JSXFragment',\n 'JSXOpeningFragment',\n 'JSXClosingFragment',\n 'JSXText',\n 'JSXEmptyExpression',\n 'JSXSpreadChild'\n ],\n ImportDeclaration: 'first',\n ObjectExpression: 'first',\n outerIIFEBody: 1,\n SwitchCase: 1,\n VariableDeclarator: 'first'\n }\n ],\n '@stylistic/indent-binary-ops': ['error', 4],\n '@stylistic/jsx-quotes': ['error', 'prefer-double'],\n '@stylistic/key-spacing': [\n 'error',\n {\n afterColon: true,\n beforeColon: false,\n mode: 'minimum'\n }\n ],\n '@stylistic/keyword-spacing': ['error', {\n after: true,\n before: true\n }],\n '@stylistic/line-comment-position': [\n 'off',\n {\n applyDefaultPatterns: true,\n ignorePattern: '',\n position: 'above'\n }\n ],\n '@stylistic/linebreak-style': ['error', 'unix'],\n '@stylistic/lines-around-comment': 'off',\n '@stylistic/lines-between-class-members': [\n 'error',\n 'always',\n {exceptAfterSingleLine: false}\n ],\n '@stylistic/max-len': [\n 'error',\n {\n code: 120,\n ignoreComments: true,\n ignoreRegExpLiterals: true,\n ignoreTemplateLiterals: true,\n ignoreUrls: true\n }\n ],\n '@stylistic/max-statements-per-line': ['error', {max: 1}],\n '@stylistic/member-delimiter-style': [\n 'error',\n {\n multiline: {\n delimiter: 'semi',\n requireLast: true\n },\n multilineDetection: 'brackets',\n singleline: {\n delimiter: 'semi',\n requireLast: false\n }\n }\n ],\n '@stylistic/multiline-ternary': ['off', 'never'],\n '@stylistic/new-parens': ['error', 'always'],\n '@stylistic/newline-per-chained-call': ['error', {ignoreChainWithDepth: 4}],\n '@stylistic/no-confusing-arrow': ['error', {allowParens: true}],\n '@stylistic/no-extra-parens': 'off',\n '@stylistic/no-extra-semi': 'error',\n '@stylistic/no-floating-decimal': 'error',\n '@stylistic/no-mixed-operators': [\n 'error',\n {\n allowSamePrecedence: false,\n groups: [\n ['%', '**'],\n ['%', '+'],\n ['%', '-'],\n ['%', '*'],\n ['%', '/'],\n ['/', '*'],\n ['&', '|', '<<', '>>', '>>>'],\n ['==', '!=', '===', '!=='],\n ['&&', '||']\n ]\n }\n ],\n '@stylistic/no-mixed-spaces-and-tabs': 'error',\n '@stylistic/no-multi-spaces': 'error',\n '@stylistic/no-multiple-empty-lines': ['error', {\n max: 1,\n maxBOF: 0,\n maxEOF: 0\n }],\n '@stylistic/no-tabs': 'error',\n '@stylistic/no-trailing-spaces': 'error',\n '@stylistic/no-whitespace-before-property': 'error',\n '@stylistic/nonblock-statement-body-position': ['error', 'beside', {overrides: {}}],\n '@stylistic/object-curly-newline': [\n 'error', {\n ExportDeclaration: {consistent: true},\n ImportDeclaration: {consistent: true},\n ObjectExpression: {\n minProperties: 2,\n multiline: true\n },\n ObjectPattern: {consistent: true},\n TSEnumBody: {consistent: true},\n TSInterfaceBody: {consistent: true},\n TSTypeLiteral: {consistent: true}\n }\n ],\n '@stylistic/object-curly-spacing': ['error', 'never'],\n '@stylistic/object-property-newline': 'off',\n '@stylistic/one-var-declaration-per-line': ['error', 'always'],\n '@stylistic/operator-linebreak': ['error', 'before'],\n '@stylistic/padded-blocks': ['error', 'never'],\n '@stylistic/padding-line-between-statements': [\n 'error',\n {\n blankLine: 'always',\n next: '*',\n prev: ['const', 'let', 'var']\n },\n {\n blankLine: 'any',\n next: ['const', 'let', 'var'],\n prev: ['const', 'let', 'var']\n },\n {\n blankLine: 'always',\n next: '*',\n prev: 'directive'\n },\n {\n blankLine: 'any',\n next: 'directive',\n prev: 'directive'\n },\n {\n blankLine: 'always',\n next: 'return',\n prev: '*'\n }\n ],\n '@stylistic/quote-props': [\n 'error',\n 'as-needed',\n {\n keywords: false,\n numbers: false,\n unnecessary: true\n }\n ],\n '@stylistic/quotes': ['error', 'single', {avoidEscape: true}],\n '@stylistic/rest-spread-spacing': ['error', 'never'],\n '@stylistic/semi': ['error', 'always'],\n '@stylistic/semi-spacing': ['error', {\n after: true,\n before: false\n }],\n '@stylistic/semi-style': ['error', 'last'],\n '@stylistic/space-before-blocks': ['error', 'always'],\n '@stylistic/space-before-function-paren': [\n 'error',\n {\n anonymous: 'never',\n asyncArrow: 'always',\n named: 'never'\n }\n ],\n '@stylistic/space-in-parens': ['error', 'never'],\n '@stylistic/space-infix-ops': 'error',\n '@stylistic/space-unary-ops': [\n 'error',\n {\n nonwords: false,\n overrides: {},\n words: true\n }\n ],\n '@stylistic/spaced-comment': [\n 'error',\n 'always',\n {\n block: {\n balanced: true,\n exceptions: ['-', '+'],\n markers: ['=', '!', ':', '::']\n },\n line: {\n exceptions: ['-', '+'],\n markers: ['=', '!', '/']\n }\n }\n ],\n '@stylistic/switch-colon-spacing': ['error', {\n after: true,\n before: false\n }],\n '@stylistic/template-curly-spacing': ['error', 'never'],\n '@stylistic/template-tag-spacing': ['error', 'never'],\n '@stylistic/type-annotation-spacing': 'error',\n '@stylistic/type-generic-spacing': 'error',\n '@stylistic/type-named-tuple-spacing': 'error',\n '@stylistic/wrap-iife': ['error', 'outside', {functionPrototypeMethods: false}],\n '@stylistic/wrap-regex': 'error',\n '@stylistic/yield-star-spacing': ['error', 'after']\n};"],"names":["stylistic","after","before","allowSingleLine","exceptions","ArrayExpression","ArrayPattern","ArrowFunctionExpression","CallExpression","FunctionDeclaration","FunctionExpression","ImportDeclaration","NewExpression","ObjectExpression","ObjectPattern","VariableDeclaration","arguments","flatTernaryExpressions","body","parameters","ignoreComments","ignoredNodes","outerIIFEBody","SwitchCase","VariableDeclarator","afterColon","beforeColon","mode","applyDefaultPatterns","ignorePattern","position","exceptAfterSingleLine","code","ignoreRegExpLiterals","ignoreTemplateLiterals","ignoreUrls","max","multiline","delimiter","requireLast","multilineDetection","singleline","ignoreChainWithDepth","allowParens","allowSamePrecedence","groups","maxBOF","maxEOF","overrides","ExportDeclaration","consistent","minProperties","TSEnumBody","TSInterfaceBody","TSTypeLiteral","blankLine","next","prev","keywords","numbers","unnecessary","avoidEscape","anonymous","asyncArrow","named","nonwords","words","block","balanced","markers","line","functionPrototypeMethods"],"mappings":"AAAO,MAAMA,SAAS,GAAG;AACrB,EAAA,kCAAkC,EAA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SAAS,EAAE,EAAE;AACbkB,IAAAA,KAAK,EAAE;AACX,GAAC,CACJ;AACD,EAAA,2BAA2B,EAAE,CACzB,OAAO,EACP,QAAQ,EACR;AACIC,IAAAA,KAAK,EAAE;AACHC,MAAAA,QAAQ,EAAE,IAAI;AACdhE,MAAAA,UAAU,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;MACtBiE,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI;KAChC;AACDC,IAAAA,IAAI,EAAE;AACFlE,MAAAA,UAAU,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;AACtBiE,MAAAA,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG;AAC3B;AACJ,GAAC,CACJ;EACD,iCAAiC,EAAE,CAAC,OAAO,EAAE;AACzCpE,IAAAA,KAAK,EAAE,IAAI;AACXC,IAAAA,MAAM,EAAE;AACZ,GAAC,CAAC;AACF,EAAA,mCAAmC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;AACvD,EAAA,iCAAiC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;AACrD,EAAA,oCAAoC,EAAE,OAAO;AAC7C,EAAA,iCAAiC,EAAE,OAAO;AAC1C,EAAA,qCAAqC,EAAE,OAAO;AAC9C,EAAA,sBAAsB,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE;AAACqE,IAAAA,wBAAwB,EAAE;AAAK,GAAC,CAAC;AAC/E,EAAA,uBAAuB,EAAE,OAAO;AAChC,EAAA,+BAA+B,EAAE,CAAC,OAAO,EAAE,OAAO;AACtD;;;;"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
|
-
import { getComponentInfoFromStatement, getTypeDeclarationInfo, collectTypeReferences, isDisplayNameAssignment, isComponentExport, isStyledDeclaration } from './utils/component-file-structure-utils.js';
|
|
2
|
+
import { getComponentInfoFromStatement, getTypeDeclarationInfo, isDefaultComponentExport, collectTypeReferences, isDisplayNameAssignment, isComponentExport, isStyledDeclaration, isStyledFactoryDeclaration } from './utils/component-file-structure-utils.js';
|
|
3
3
|
|
|
4
4
|
const createRule$b = ESLintUtils.RuleCreator(name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`);
|
|
5
|
+
const ORDER_LABELS = ['Imports', 'Optional declarations', 'Props types', 'Component', 'Component helpers and displayName', 'Exports', 'Styled components and local helper types'];
|
|
6
|
+
const ORDER_MESSAGE = ORDER_LABELS.join(' -> ');
|
|
7
|
+
const getSectionLabel = section => ORDER_LABELS[section - 1] ?? 'Unknown';
|
|
8
|
+
const PAGE_TYPE_NAMES = new Set(['NextPage', 'NextPageWithLayout', 'NextSSRPage', 'NextSSRPageWithLayout', 'NextSSGPageWithLayout']);
|
|
5
9
|
const componentFileStructure = createRule$b({
|
|
6
10
|
defaultOptions: [],
|
|
7
11
|
meta: {
|
|
@@ -9,7 +13,7 @@ const componentFileStructure = createRule$b({
|
|
|
9
13
|
description: 'Enforce file structure order for React component files.'
|
|
10
14
|
},
|
|
11
15
|
messages: {
|
|
12
|
-
invalidOrder: 'This file structure block is out of order.',
|
|
16
|
+
invalidOrder: 'This file structure block is out of order. {{currentName}} is a {{current}} and should be before {{previousName}}. Expected order: {{order}}.',
|
|
13
17
|
missingDisplayName: 'Component {{name}} must set displayName.',
|
|
14
18
|
missingNamedExport: 'Component {{name}} must be exported by name.'
|
|
15
19
|
},
|
|
@@ -37,9 +41,70 @@ const componentFileStructure = createRule$b({
|
|
|
37
41
|
}
|
|
38
42
|
const propsTypeNames = new Set();
|
|
39
43
|
const propsTypeRefs = new Set();
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
const propsTypeNode = componentInfo.propsTypeNode ?? null;
|
|
45
|
+
const isPageType = () => {
|
|
46
|
+
const typeNode = componentInfo.componentTypeNode ?? null;
|
|
47
|
+
if (!typeNode) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
const typeRefs = new Set();
|
|
51
|
+
collectTypeReferences(typeNode, typeRefs);
|
|
52
|
+
return Array.from(typeRefs).some(name => PAGE_TYPE_NAMES.has(name));
|
|
53
|
+
};
|
|
54
|
+
const isPageLayoutAssignment = statement => {
|
|
55
|
+
if (statement.type !== 'ExpressionStatement') {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
const {
|
|
59
|
+
expression
|
|
60
|
+
} = statement;
|
|
61
|
+
if (expression.type !== 'AssignmentExpression') {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
const {
|
|
65
|
+
left
|
|
66
|
+
} = expression;
|
|
67
|
+
if (left.type !== 'MemberExpression' || left.object.type !== 'Identifier') {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
if (left.object.name !== componentName || left.property.type !== 'Identifier') {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
return left.property.name === 'getLayout' || left.property.name === 'getLayoutKey';
|
|
74
|
+
};
|
|
75
|
+
const hasDefaultExport = programBody.some(statement => isDefaultComponentExport(statement, componentName));
|
|
76
|
+
const hasLayoutAssignment = programBody.some(statement => isPageLayoutAssignment(statement));
|
|
77
|
+
const isPageComponent = hasDefaultExport && (hasLayoutAssignment || isPageType());
|
|
78
|
+
const hasStaticDisplayName = () => {
|
|
79
|
+
const hasDisplayNameMember = member => {
|
|
80
|
+
if (member.type !== 'PropertyDefinition' && member.type !== 'ClassProperty') {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
if (!member.static || member.key.type !== 'Identifier') {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
return member.key.name === 'displayName';
|
|
87
|
+
};
|
|
88
|
+
if (componentInfo.statement.type === 'ClassDeclaration') {
|
|
89
|
+
return componentInfo.statement.id?.name === componentName && componentInfo.statement.body.body.some(hasDisplayNameMember);
|
|
90
|
+
}
|
|
91
|
+
if (componentInfo.statement.type === 'VariableDeclaration') {
|
|
92
|
+
for (const declarator of componentInfo.statement.declarations) {
|
|
93
|
+
if (declarator.id.type !== 'Identifier' || declarator.id.name !== componentName) {
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
const {
|
|
97
|
+
init
|
|
98
|
+
} = declarator;
|
|
99
|
+
if (init?.type === 'ClassExpression') {
|
|
100
|
+
return init.body.body.some(hasDisplayNameMember);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return false;
|
|
105
|
+
};
|
|
106
|
+
if (propsTypeNode) {
|
|
107
|
+
collectTypeReferences(propsTypeNode, propsTypeRefs);
|
|
43
108
|
for (const name of propsTypeRefs) {
|
|
44
109
|
if (typeDeclarations.has(name)) {
|
|
45
110
|
propsTypeNames.add(name);
|
|
@@ -56,7 +121,7 @@ const componentFileStructure = createRule$b({
|
|
|
56
121
|
};
|
|
57
122
|
const isOptionalVarDeclaration = statement => {
|
|
58
123
|
if (statement.type === 'VariableDeclaration') {
|
|
59
|
-
if (statement === componentInfo.statement || isStyledDeclaration(statement)) {
|
|
124
|
+
if (statement === componentInfo.statement || isStyledDeclaration(statement) || isStyledFactoryDeclaration(statement)) {
|
|
60
125
|
return false;
|
|
61
126
|
}
|
|
62
127
|
return true;
|
|
@@ -76,13 +141,19 @@ const componentFileStructure = createRule$b({
|
|
|
76
141
|
if (isDisplayNameAssignment(statement, componentName)) {
|
|
77
142
|
return 5;
|
|
78
143
|
}
|
|
79
|
-
if (isComponentExport(statement, componentName)) {
|
|
144
|
+
if (isComponentExport(statement, componentName) || isDefaultComponentExport(statement, componentName)) {
|
|
80
145
|
return 6;
|
|
81
146
|
}
|
|
82
|
-
if (
|
|
147
|
+
if (isPageComponent && isNonPropsTypeDeclaration(statement) && statement.range[0] < componentInfo.statement.range[0]) {
|
|
148
|
+
return 2;
|
|
149
|
+
}
|
|
150
|
+
if (isStyledDeclaration(statement) || isStyledFactoryDeclaration(statement) || isNonPropsTypeDeclaration(statement)) {
|
|
83
151
|
return 7;
|
|
84
152
|
}
|
|
85
153
|
if (isOptionalVarDeclaration(statement)) {
|
|
154
|
+
if (statement.range[0] > componentInfo.statement.range[0]) {
|
|
155
|
+
return 5;
|
|
156
|
+
}
|
|
86
157
|
return 2;
|
|
87
158
|
}
|
|
88
159
|
if (isPropsTypeDeclaration(statement)) {
|
|
@@ -90,10 +161,52 @@ const componentFileStructure = createRule$b({
|
|
|
90
161
|
}
|
|
91
162
|
return null;
|
|
92
163
|
};
|
|
164
|
+
const getStatementName = (statement, section) => {
|
|
165
|
+
if (section === 4) {
|
|
166
|
+
return componentName;
|
|
167
|
+
}
|
|
168
|
+
if (section === 5 && isDisplayNameAssignment(statement, componentName)) {
|
|
169
|
+
return `${componentName}.displayName`;
|
|
170
|
+
}
|
|
171
|
+
if (statement.type === 'VariableDeclaration') {
|
|
172
|
+
const first = statement.declarations[0];
|
|
173
|
+
if (first?.id.type === 'Identifier') {
|
|
174
|
+
return first.id.name;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (statement.type === 'FunctionDeclaration' || statement.type === 'ClassDeclaration') {
|
|
178
|
+
return statement.id?.name ?? getSectionLabel(section);
|
|
179
|
+
}
|
|
180
|
+
if (statement.type === 'ExportDefaultDeclaration') {
|
|
181
|
+
const {
|
|
182
|
+
declaration
|
|
183
|
+
} = statement;
|
|
184
|
+
if (declaration.type === 'Identifier') {
|
|
185
|
+
return `export default ${declaration.name}`;
|
|
186
|
+
}
|
|
187
|
+
if (declaration.type === 'ClassDeclaration' || declaration.type === 'FunctionDeclaration') {
|
|
188
|
+
if (declaration.id?.name) {
|
|
189
|
+
return `export default ${declaration.id.name}`;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return 'export default';
|
|
193
|
+
}
|
|
194
|
+
if (statement.type === 'ExportNamedDeclaration') {
|
|
195
|
+
const names = statement.specifiers.filter(specifier => specifier.local.type === 'Identifier').map(specifier => specifier.local.name);
|
|
196
|
+
if (names.length === 1) {
|
|
197
|
+
return `export {${names[0]}}`;
|
|
198
|
+
}
|
|
199
|
+
if (names.length > 1) {
|
|
200
|
+
return 'export {...}';
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return getSectionLabel(section);
|
|
204
|
+
};
|
|
93
205
|
return {
|
|
94
206
|
Program() {
|
|
95
207
|
let lastSection = 0;
|
|
96
|
-
let
|
|
208
|
+
let lastSectionName = '';
|
|
209
|
+
let hasDisplayName = hasStaticDisplayName();
|
|
97
210
|
let hasNamedExport = false;
|
|
98
211
|
for (const statement of programBody) {
|
|
99
212
|
const section = sectionForStatement(statement);
|
|
@@ -108,14 +221,22 @@ const componentFileStructure = createRule$b({
|
|
|
108
221
|
}
|
|
109
222
|
if (section < lastSection) {
|
|
110
223
|
context.report({
|
|
224
|
+
data: {
|
|
225
|
+
current: getSectionLabel(section),
|
|
226
|
+
currentName: getStatementName(statement, section),
|
|
227
|
+
order: ORDER_MESSAGE,
|
|
228
|
+
previous: getSectionLabel(lastSection),
|
|
229
|
+
previousName: lastSectionName || getSectionLabel(lastSection)
|
|
230
|
+
},
|
|
111
231
|
messageId: 'invalidOrder',
|
|
112
232
|
node: statement
|
|
113
233
|
});
|
|
114
234
|
} else {
|
|
115
235
|
lastSection = section;
|
|
236
|
+
lastSectionName = getStatementName(statement, section);
|
|
116
237
|
}
|
|
117
238
|
}
|
|
118
|
-
if (!hasDisplayName) {
|
|
239
|
+
if (!hasDisplayName && !isPageComponent) {
|
|
119
240
|
context.report({
|
|
120
241
|
data: {
|
|
121
242
|
name: componentName
|
|
@@ -124,7 +245,7 @@ const componentFileStructure = createRule$b({
|
|
|
124
245
|
node: componentInfo.statement
|
|
125
246
|
});
|
|
126
247
|
}
|
|
127
|
-
if (!hasNamedExport) {
|
|
248
|
+
if (!hasNamedExport && !isPageComponent) {
|
|
128
249
|
context.report({
|
|
129
250
|
data: {
|
|
130
251
|
name: componentName
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-file-structure.js","sources":["../../../../src/rules/custom/component-file-structure.ts"],"sourcesContent":["import {ESLintUtils} from '@typescript-eslint/utils';\n\nimport {\n collectTypeReferences,\n getComponentInfoFromStatement,\n getTypeDeclarationInfo,\n isComponentExport,\n isDisplayNameAssignment,\n isStyledDeclaration\n} from './utils/component-file-structure-utils';\n\nimport type {ComponentInfo} from './utils/component-file-structure-utils';\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\ntype MessageIds = 'invalidOrder' | 'missingDisplayName' | 'missingNamedExport';\n\nexport const componentFileStructure = createRule<[], MessageIds>({\n defaultOptions: [],\n meta: {\n docs: {description: 'Enforce file structure order for React component files.'},\n messages: {\n invalidOrder: 'This file structure block is out of order.',\n missingDisplayName: 'Component {{name}} must set displayName.',\n missingNamedExport: 'Component {{name}} must be exported by name.'\n },\n schema: [],\n type: 'suggestion'\n },\n name: 'component-file-structure',\n /**\n * Creates the rule listener for enforcing component file structure ordering. It analyzes the program body to\n * identify the primary component, its props types, and structural sections. It then reports ordering issues and\n * missing requirements like displayName or named exports.\n *\n * @param context The ESLint rule context used to access source code and report diagnostics.\n * @returns A rule listener that validates component file structure and reports issues.\n *\n * @example\n * ```tsx\n * // eslint-disable-next-line @nfq/component-file-structure\n * const listener = componentFileStructure.create(context);\n * ```\n */\n create(context) {\n const {sourceCode} = context;\n const programBody = sourceCode.ast.body;\n const componentCandidates = programBody\n .filter((statement): statement is TSESTree.Statement => statement.type !== 'TSModuleDeclaration')\n .map(statement => getComponentInfoFromStatement(statement))\n .filter((info): info is ComponentInfo => Boolean(info));\n\n if (componentCandidates.length === 0) {\n return {};\n }\n\n const componentInfo = componentCandidates.sort(\n (left, right) => left.statement.range[0] - right.statement.range[0]\n )[0];\n const componentName = componentInfo.name;\n const typeDeclarations = new Map<string, TSESTree.Node>();\n\n for (const statement of programBody) {\n const info = getTypeDeclarationInfo(statement as TSESTree.Statement);\n\n if (info) {\n typeDeclarations.set(info.name, info.statement);\n }\n }\n\n const propsTypeNames = new Set<string>();\n const propsTypeRefs = new Set<string>();\n const propsParam = componentInfo.functionNode.params[0];\n\n if ('typeAnnotation' in propsParam && propsParam.typeAnnotation) {\n collectTypeReferences(propsParam.typeAnnotation, propsTypeRefs);\n\n for (const name of propsTypeRefs) {\n if (typeDeclarations.has(name)) {\n propsTypeNames.add(name);\n }\n }\n }\n\n /**\n * Determines whether a statement declares a type that is used as the component props. It inspects the statement\n * for a type declaration and compares the declared name against the collected props type names. It returns a\n * boolean so callers can classify statements into the props type section.\n *\n * @param statement The statement to inspect for a props type declaration.\n * @returns True when the statement declares a props type; otherwise false.\n *\n * @example\n * ```tsx\n * const isProps = isPropsTypeDeclaration(statement);\n * ```\n */\n const isPropsTypeDeclaration = (statement: TSESTree.Statement) => {\n const info = getTypeDeclarationInfo(statement);\n\n return Boolean(info && propsTypeNames.has(info.name));\n };\n\n /**\n * Determines whether a statement declares a type that is not used as the component props. It inspects the\n * statement for a type declaration and ensures the declared name is not among the collected props type names.\n * It returns a boolean so callers can classify statements into non-props type sections.\n *\n * @param statement The statement to inspect for a non-props type declaration.\n * @returns True when the statement declares a non-props type; otherwise false.\n *\n * @example\n * ```tsx\n * const isNonProps = isNonPropsTypeDeclaration(statement);\n * ```\n */\n const isNonPropsTypeDeclaration = (statement: TSESTree.Statement) => {\n const info = getTypeDeclarationInfo(statement);\n\n return Boolean(info && !propsTypeNames.has(info.name));\n };\n\n /**\n * Determines whether a statement is an optional variable-like declaration in the component file structure. It\n * filters out the main component statement and styled declarations to avoid misclassification. It considers\n * variable declarations, non-component function declarations, and enum declarations as optional declarations.\n *\n * @param statement The statement to evaluate for optional declaration status.\n * @returns True when the statement should be treated as an optional declaration; otherwise false.\n *\n * @example\n * ```tsx\n * const isOptional = isOptionalVarDeclaration(statement);\n * ```\n */\n const isOptionalVarDeclaration = (statement: TSESTree.Statement) => {\n if (statement.type === 'VariableDeclaration') {\n if (statement === componentInfo.statement || isStyledDeclaration(statement)) {\n return false;\n }\n\n return true;\n }\n\n if (statement.type === 'FunctionDeclaration') {\n return statement !== componentInfo.statement;\n }\n\n return statement.type === 'TSEnumDeclaration';\n };\n\n /**\n * Determines the structural section number for a given statement in a component file. It checks the statement\n * against known component structure elements like imports, the main component, displayName assignment, exports,\n * styled declarations, optional declarations, and props types. It returns a numeric section marker to help\n * enforce ordering rules or null when the statement does not belong to a tracked section.\n *\n * @param statement The statement to classify within the component file structure.\n * @returns The numeric section identifier for the statement, or null when it does not match a section.\n *\n * @example\n * ```tsx\n * const section = sectionForStatement(statement);\n * ```\n */\n const sectionForStatement = (statement: TSESTree.Statement) => {\n if (statement.type === 'ImportDeclaration') {\n return 1;\n }\n\n if (statement === componentInfo.statement) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 4;\n }\n\n if (isDisplayNameAssignment(statement, componentName)) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 5;\n }\n\n if (isComponentExport(statement, componentName)) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 6;\n }\n\n if (isStyledDeclaration(statement) || isNonPropsTypeDeclaration(statement)) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 7;\n }\n\n if (isOptionalVarDeclaration(statement)) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 2;\n }\n\n if (isPropsTypeDeclaration(statement)) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 3;\n }\n\n return null;\n };\n\n return {\n /**\n * Iterates over the program body statements to validate their order based on the defined component file structure. It\n * tracks the last seen section and reports any statement that appears in an earlier section than the last one. It also checks\n * for the presence of a displayName assignment and a named export for the component, reporting if either is missing.\n * This ensures that the component file adheres to the expected structure and includes necessary metadata for better maintainability and clarity.\n *\n * @example\n * ```tsx\n * Program();\n * ```\n */\n Program() {\n let lastSection = 0;\n let hasDisplayName = false;\n let hasNamedExport = false;\n\n for (const statement of programBody) {\n const section = sectionForStatement(statement as TSESTree.Statement);\n\n // eslint-disable-next-line @nfq/no-magic-numbers\n if (section === 5) {\n hasDisplayName = true;\n }\n\n // eslint-disable-next-line @nfq/no-magic-numbers\n if (section === 6) {\n hasNamedExport = true;\n }\n\n if (!section) {\n continue;\n }\n\n if (section < lastSection) {\n context.report({\n messageId: 'invalidOrder',\n node: statement\n });\n } else {\n lastSection = section;\n }\n }\n\n if (!hasDisplayName) {\n context.report({\n data: {name: componentName},\n messageId: 'missingDisplayName',\n node: componentInfo.statement\n });\n }\n\n if (!hasNamedExport) {\n context.report({\n data: {name: componentName},\n messageId: 'missingNamedExport',\n node: componentInfo.statement\n });\n }\n }\n } as TSESLint.RuleListener;\n }\n});"],"names":["createRule","ESLintUtils","RuleCreator","name","componentFileStructure","defaultOptions","meta","docs","description","messages","invalidOrder","missingDisplayName","missingNamedExport","schema","type","create","context","sourceCode","programBody","ast","body","componentCandidates","filter","statement","map","getComponentInfoFromStatement","info","Boolean","length","componentInfo","sort","left","right","range","componentName","typeDeclarations","Map","getTypeDeclarationInfo","set","propsTypeNames","Set","propsTypeRefs","propsParam","functionNode","params","typeAnnotation","collectTypeReferences","has","add","isPropsTypeDeclaration","isNonPropsTypeDeclaration","isOptionalVarDeclaration","isStyledDeclaration","sectionForStatement","isDisplayNameAssignment","isComponentExport","Program","lastSection","hasDisplayName","hasNamedExport","section","report","messageId","node","data"],"mappings":";;;AAcA,MAAMA,YAAU,GAAGC,WAAW,CAACC,WAAW,CACtCC,IAAI,IAAI,CAAA,kEAAA,EAAqEA,IAAI,CAAA,GAAA,CACrF,CAAC;AAIM,MAAMC,sBAAsB,GAAGJ,YAAU,CAAiB;AAC7DK,EAAAA,cAAc,EAAE,EAAE;AAClBC,EAAAA,IAAI,EAAE;AACFC,IAAAA,IAAI,EAAE;AAACC,MAAAA,WAAW,EAAE;KAA0D;AAC9EC,IAAAA,QAAQ,EAAE;AACNC,MAAAA,YAAY,EAAE,4CAA4C;AAC1DC,MAAAA,kBAAkB,EAAE,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CAAC,EAAE;AACfF,YAAAA,cAAc,GAAG,IAAI;AACzB,UAAA;UAGA,IAAIE,OAAO,KAAK,CAAC,EAAE;AACfD,YAAAA,cAAc,GAAG,IAAI;AACzB,UAAA;UAEA,IAAI,CAACC,OAAO,EAAE;AACV,YAAA;AACJ,UAAA;UAEA,IAAIA,OAAO,GAAGH,WAAW,EAAE;YACvBzC,OAAO,CAAC6C,MAAM,CAAC;AACXC,cAAAA,SAAS,EAAE,cAAc;AACzBC,cAAAA,IAAI,EAAExC;AACV,aAAC,CAAC;AACN,UAAA,CAAC,MAAM;AACHkC,YAAAA,WAAW,GAAGG,OAAO;AACzB,UAAA;AACJ,QAAA;QAEA,IAAI,CAACF,cAAc,EAAE;UACjB1C,OAAO,CAAC6C,MAAM,CAAC;AACXG,YAAAA,IAAI,EAAE;AAAC7D,cAAAA,IAAI,EAAE+B;aAAc;AAC3B4B,YAAAA,SAAS,EAAE,oBAAoB;YAC/BC,IAAI,EAAElC,aAAa,CAACN;AACxB,WAAC,CAAC;AACN,QAAA;QAEA,IAAI,CAACoC,cAAc,EAAE;UACjB3C,OAAO,CAAC6C,MAAM,CAAC;AACXG,YAAAA,IAAI,EAAE;AAAC7D,cAAAA,IAAI,EAAE+B;aAAc;AAC3B4B,YAAAA,SAAS,EAAE,oBAAoB;YAC/BC,IAAI,EAAElC,aAAa,CAACN;AACxB,WAAC,CAAC;AACN,QAAA;AACJ,MAAA;KACH;AACL,EAAA;AACJ,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"component-file-structure.js","sources":["../../../../src/rules/custom/component-file-structure.ts"],"sourcesContent":["import {ESLintUtils} from '@typescript-eslint/utils';\n\nimport {\n collectTypeReferences,\n getComponentInfoFromStatement,\n getTypeDeclarationInfo,\n isComponentExport,\n isDefaultComponentExport,\n isDisplayNameAssignment,\n isStyledDeclaration,\n isStyledFactoryDeclaration\n} from './utils/component-file-structure-utils';\n\nimport type {ComponentInfo} from './utils/component-file-structure-utils';\nimport type {TSESLint, TSESTree} from '@typescript-eslint/utils';\n\nconst createRule = ESLintUtils.RuleCreator(\n name => `https://github.com/nfqde/eslint-config-nfq/blob/master/docs/rules/${name}.md`\n);\n\ntype MessageIds = 'invalidOrder' | 'missingDisplayName' | 'missingNamedExport';\n\nconst ORDER_LABELS = [\n 'Imports',\n 'Optional declarations',\n 'Props types',\n 'Component',\n 'Component helpers and displayName',\n 'Exports',\n 'Styled components and local helper types'\n];\nconst ORDER_MESSAGE = ORDER_LABELS.join(' -> ');\n// eslint-disable-next-line jsdoc/require-jsdoc\nconst getSectionLabel = (section: number) => ORDER_LABELS[section - 1] ?? 'Unknown';\nconst PAGE_TYPE_NAMES = new Set([\n 'NextPage',\n 'NextPageWithLayout',\n 'NextSSRPage',\n 'NextSSRPageWithLayout',\n 'NextSSGPageWithLayout'\n]);\n\nexport const componentFileStructure = createRule<[], MessageIds>({\n defaultOptions: [],\n meta: {\n docs: {description: 'Enforce file structure order for React component files.'},\n messages: {\n // eslint-disable-next-line @stylistic/max-len\n invalidOrder: 'This file structure block is out of order. {{currentName}} is a {{current}} and should be before {{previousName}}. Expected order: {{order}}.',\n missingDisplayName: 'Component {{name}} must set displayName.',\n missingNamedExport: 'Component {{name}} must be exported by name.'\n },\n schema: [],\n type: 'suggestion'\n },\n name: 'component-file-structure',\n /**\n * Creates the rule listener for enforcing component file structure ordering. It analyzes the program body to\n * identify the primary component, its props types, and structural sections. It then reports ordering issues and\n * missing requirements like displayName or named exports.\n *\n * @param context The ESLint rule context used to access source code and report diagnostics.\n * @returns A rule listener that validates component file structure and reports issues.\n *\n * @example\n * ```tsx\n * // eslint-disable-next-line @nfq/component-file-structure\n * const listener = componentFileStructure.create(context);\n * ```\n */\n // eslint-disable-next-line max-lines-per-function\n create(context) {\n const {sourceCode} = context;\n const programBody = sourceCode.ast.body;\n const componentCandidates = programBody\n .filter((statement): statement is TSESTree.Statement => statement.type !== 'TSModuleDeclaration')\n .map(statement => getComponentInfoFromStatement(statement))\n .filter((info): info is ComponentInfo => Boolean(info));\n\n if (componentCandidates.length === 0) {\n return {};\n }\n\n const componentInfo = componentCandidates.sort(\n (left, right) => left.statement.range[0] - right.statement.range[0]\n )[0];\n const componentName = componentInfo.name;\n const typeDeclarations = new Map<string, TSESTree.Node>();\n\n for (const statement of programBody) {\n const info = getTypeDeclarationInfo(statement as TSESTree.Statement);\n\n if (info) {\n typeDeclarations.set(info.name, info.statement);\n }\n }\n\n const propsTypeNames = new Set<string>();\n const propsTypeRefs = new Set<string>();\n const propsTypeNode = componentInfo.propsTypeNode ?? null;\n /**\n * Determines whether the component uses a page-specific type alias. It inspects the component type node\n * and collects all referenced type names. It then checks if any of those names match known page types to\n * decide if the component is a page component.\n *\n * @returns True when the component type includes a known page type; otherwise false.\n *\n * @example\n * ```tsx\n * const isPage = isPageType();\n * ```\n */\n const isPageType = () => {\n const typeNode = componentInfo.componentTypeNode ?? null;\n\n if (!typeNode) {\n return false;\n }\n\n const typeRefs = new Set<string>();\n\n collectTypeReferences(typeNode, typeRefs);\n\n return Array.from(typeRefs).some(name => PAGE_TYPE_NAMES.has(name));\n };\n\n /**\n * Checks whether a statement assigns a page layout helper to the component. It ensures the statement is\n * an assignment expression targeting a member of the component identifier. It then verifies the member name\n * matches supported layout assignment properties.\n *\n * @param statement The statement to inspect for a layout assignment.\n * @returns True when the statement assigns a layout helper on the component; otherwise false.\n *\n * @example\n * ```tsx\n * const hasLayout = isPageLayoutAssignment(statement);\n * ```\n */\n const isPageLayoutAssignment = (statement: TSESTree.Statement) => {\n if (statement.type !== 'ExpressionStatement') {\n return false;\n }\n\n const {expression} = statement;\n\n if (expression.type !== 'AssignmentExpression') {\n return false;\n }\n\n const {left} = expression;\n\n if (left.type !== 'MemberExpression' || left.object.type !== 'Identifier') {\n return false;\n }\n\n if (left.object.name !== componentName || left.property.type !== 'Identifier') {\n return false;\n }\n\n return left.property.name === 'getLayout' || left.property.name === 'getLayoutKey';\n };\n\n const hasDefaultExport = programBody\n .some(statement => isDefaultComponentExport(statement as TSESTree.Statement, componentName));\n const hasLayoutAssignment = programBody\n .some(statement => isPageLayoutAssignment(statement as TSESTree.Statement));\n const isPageComponent = hasDefaultExport && (hasLayoutAssignment || isPageType());\n\n /**\n * Determines whether a class element represents a static displayName member. It checks that the element is a supported\n * property definition shape and that it is declared as static. It then verifies the identifier name matches the expected\n * displayName property, which signals a static display name assignment on a class.\n *\n * @returns True when the element is a static displayName property; otherwise false.\n *\n * @example\n * ```tsx\n * const isDisplayName = hasDisplayNameMember(member);\n * ```\n */\n const hasStaticDisplayName = () => {\n /**\n * Determines whether a class element represents a static displayName member. It checks that the element is a supported\n * property definition shape and that it is declared as static. It then verifies the identifier name matches the expected\n * displayName property, which signals a static display name assignment on a class.\n *\n * @param member The class element to inspect for a static displayName property.\n * @returns True when the element is a static displayName property; otherwise false.\n *\n * @example\n * ```tsx\n * const isDisplayName = hasDisplayNameMember(member);\n * ```\n */\n const hasDisplayNameMember = (member: TSESTree.ClassElement) => {\n // @ts-expect-error\n if (member.type !== 'PropertyDefinition' && member.type !== 'ClassProperty') {\n return false;\n }\n\n if (!member.static || member.key.type !== 'Identifier') {\n return false;\n }\n\n return member.key.name === 'displayName';\n };\n\n if (componentInfo.statement.type === 'ClassDeclaration') {\n return componentInfo.statement.id?.name === componentName\n && componentInfo.statement.body.body.some(hasDisplayNameMember);\n }\n\n if (componentInfo.statement.type === 'VariableDeclaration') {\n for (const declarator of componentInfo.statement.declarations) {\n if (declarator.id.type !== 'Identifier' || declarator.id.name !== componentName) {\n continue;\n }\n\n const {init} = declarator;\n\n if (init?.type === 'ClassExpression') {\n return init.body.body.some(hasDisplayNameMember);\n }\n }\n }\n\n return false;\n };\n\n if (propsTypeNode) {\n collectTypeReferences(propsTypeNode, propsTypeRefs);\n\n for (const name of propsTypeRefs) {\n if (typeDeclarations.has(name)) {\n propsTypeNames.add(name);\n }\n }\n }\n\n /**\n * Determines whether a statement declares a type that is used as the component props. It inspects the statement\n * for a type declaration and compares the declared name against the collected props type names. It returns a\n * boolean so callers can classify statements into the props type section.\n *\n * @param statement The statement to inspect for a props type declaration.\n * @returns True when the statement declares a props type; otherwise false.\n *\n * @example\n * ```tsx\n * const isProps = isPropsTypeDeclaration(statement);\n * ```\n */\n const isPropsTypeDeclaration = (statement: TSESTree.Statement) => {\n const info = getTypeDeclarationInfo(statement);\n\n return Boolean(info && propsTypeNames.has(info.name));\n };\n\n /**\n * Determines whether a statement declares a type that is not used as the component props. It inspects the\n * statement for a type declaration and ensures the declared name is not among the collected props type names.\n * It returns a boolean so callers can classify statements into non-props type sections.\n *\n * @param statement The statement to inspect for a non-props type declaration.\n * @returns True when the statement declares a non-props type; otherwise false.\n *\n * @example\n * ```tsx\n * const isNonProps = isNonPropsTypeDeclaration(statement);\n * ```\n */\n const isNonPropsTypeDeclaration = (statement: TSESTree.Statement) => {\n const info = getTypeDeclarationInfo(statement);\n\n return Boolean(info && !propsTypeNames.has(info.name));\n };\n\n /**\n * Determines whether a statement is an optional variable-like declaration in the component file structure. It\n * filters out the main component statement and styled declarations to avoid misclassification. It considers\n * variable declarations, non-component function declarations, and enum declarations as optional declarations.\n *\n * @param statement The statement to evaluate for optional declaration status.\n * @returns True when the statement should be treated as an optional declaration; otherwise false.\n *\n * @example\n * ```tsx\n * const isOptional = isOptionalVarDeclaration(statement);\n * ```\n */\n const isOptionalVarDeclaration = (statement: TSESTree.Statement) => {\n if (statement.type === 'VariableDeclaration') {\n if (\n statement === componentInfo.statement\n || isStyledDeclaration(statement)\n || isStyledFactoryDeclaration(statement)\n ) {\n return false;\n }\n\n return true;\n }\n\n if (statement.type === 'FunctionDeclaration') {\n return statement !== componentInfo.statement;\n }\n\n return statement.type === 'TSEnumDeclaration';\n };\n\n /**\n * Determines the structural section number for a given statement in a component file. It checks the statement\n * against known component structure elements like imports, the main component, displayName assignment, exports,\n * styled declarations, optional declarations, and props types. It returns a numeric section marker to help\n * enforce ordering rules or null when the statement does not belong to a tracked section.\n *\n * @param statement The statement to classify within the component file structure.\n * @returns The numeric section identifier for the statement, or null when it does not match a section.\n *\n * @example\n * ```tsx\n * const section = sectionForStatement(statement);\n * ```\n */\n const sectionForStatement = (statement: TSESTree.Statement) => {\n if (statement.type === 'ImportDeclaration') {\n return 1;\n }\n\n if (statement === componentInfo.statement) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 4;\n }\n\n if (isDisplayNameAssignment(statement, componentName)) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 5;\n }\n\n if (\n isComponentExport(statement, componentName)\n || isDefaultComponentExport(statement, componentName)\n ) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 6;\n }\n\n if (\n isPageComponent\n && isNonPropsTypeDeclaration(statement)\n && statement.range[0] < componentInfo.statement.range[0]\n ) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 2;\n }\n\n if (\n isStyledDeclaration(statement)\n || isStyledFactoryDeclaration(statement)\n || isNonPropsTypeDeclaration(statement)\n ) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 7;\n }\n\n if (isOptionalVarDeclaration(statement)) {\n if (statement.range[0] > componentInfo.statement.range[0]) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 5;\n }\n\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 2;\n }\n\n if (isPropsTypeDeclaration(statement)) {\n // eslint-disable-next-line @nfq/no-magic-numbers\n return 3;\n }\n\n return null;\n };\n\n /**\n * Determines a human-readable label for a statement within the component file structure. It inspects the statement\n * type and section to produce a meaningful name for reporting order violations. It also handles special cases like\n * displayName assignments and exports so diagnostics are clear and actionable.\n *\n * @param statement The statement to derive a label for.\n * @param section The section number associated with the statement.\n * @returns A descriptive name for the statement within its section.\n *\n * @example\n * ```tsx\n * const name = getStatementName(statement, 4);\n * ```\n */\n const getStatementName = (statement: TSESTree.Statement, section: number) => {\n // eslint-disable-next-line @nfq/no-magic-numbers\n if (section === 4) {\n return componentName;\n }\n\n // eslint-disable-next-line @nfq/no-magic-numbers\n if (section === 5 && isDisplayNameAssignment(statement, componentName)) {\n return `${componentName}.displayName`;\n }\n\n if (statement.type === 'VariableDeclaration') {\n const first = statement.declarations[0];\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (first?.id.type === 'Identifier') {\n return first.id.name;\n }\n }\n\n if (statement.type === 'FunctionDeclaration' || statement.type === 'ClassDeclaration') {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n return statement.id?.name ?? getSectionLabel(section);\n }\n\n if (statement.type === 'ExportDefaultDeclaration') {\n const {declaration} = statement;\n\n if (declaration.type === 'Identifier') {\n return `export default ${declaration.name}`;\n }\n\n if (declaration.type === 'ClassDeclaration' || declaration.type === 'FunctionDeclaration') {\n if (declaration.id?.name) {\n return `export default ${declaration.id.name}`;\n }\n }\n\n return 'export default';\n }\n\n if (statement.type === 'ExportNamedDeclaration') {\n const names = statement.specifiers\n .filter(specifier => specifier.local.type === 'Identifier')\n // @ts-expect-error\n .map(specifier => specifier.local.name as string);\n\n if (names.length === 1) {\n return `export {${names[0]}}`;\n }\n\n if (names.length > 1) {\n return 'export {...}';\n }\n }\n\n return getSectionLabel(section);\n };\n\n return {\n /**\n * Iterates over the program body statements to validate their order based on the defined component file structure. It\n * tracks the last seen section and reports any statement that appears in an earlier section than the last one. It also checks\n * for the presence of a displayName assignment and a named export for the component, reporting if either is missing.\n * This ensures that the component file adheres to the expected structure and includes necessary metadata for better maintainability and clarity.\n *\n * @example\n * ```tsx\n * Program();\n * ```\n */\n Program() {\n let lastSection = 0;\n let lastSectionName = '';\n let hasDisplayName = hasStaticDisplayName();\n let hasNamedExport = false;\n\n for (const statement of programBody) {\n const section = sectionForStatement(statement as TSESTree.Statement);\n\n // eslint-disable-next-line @nfq/no-magic-numbers\n if (section === 5) {\n hasDisplayName = true;\n }\n\n // eslint-disable-next-line @nfq/no-magic-numbers\n if (section === 6) {\n hasNamedExport = true;\n }\n\n if (!section) {\n continue;\n }\n\n if (section < lastSection) {\n context.report({\n data: {\n current: getSectionLabel(section),\n currentName: getStatementName(statement as TSESTree.Statement, section),\n order: ORDER_MESSAGE,\n previous: getSectionLabel(lastSection),\n previousName: lastSectionName || getSectionLabel(lastSection)\n },\n messageId: 'invalidOrder',\n node: statement\n });\n } else {\n lastSection = section;\n lastSectionName = getStatementName(statement as TSESTree.Statement, section);\n }\n }\n\n if (!hasDisplayName && !isPageComponent) {\n context.report({\n data: {name: componentName},\n messageId: 'missingDisplayName',\n node: componentInfo.statement\n });\n }\n\n if (!hasNamedExport && !isPageComponent) {\n context.report({\n data: {name: componentName},\n messageId: 'missingNamedExport',\n node: componentInfo.statement\n });\n }\n }\n } as TSESLint.RuleListener;\n }\n});"],"names":["createRule","ESLintUtils","RuleCreator","name","ORDER_LABELS","ORDER_MESSAGE","join","getSectionLabel","section","PAGE_TYPE_NAMES","Set","componentFileStructure","defaultOptions","meta","docs","description","messages","invalidOrder","missingDisplayName","missingNamedExport","schema","type","create","context","sourceCode","programBody","ast","body","componentCandidates","filter","statement","map","getComponentInfoFromStatement","info","Boolean","length","componentInfo","sort","left","right","range","componentName","typeDeclarations","Map","getTypeDeclarationInfo","set","propsTypeNames","propsTypeRefs","propsTypeNode","isPageType","typeNode","componentTypeNode","typeRefs","collectTypeReferences","Array","from","some","has","isPageLayoutAssignment","expression","object","property","hasDefaultExport","isDefaultComponentExport","hasLayoutAssignment","isPageComponent","hasStaticDisplayName","hasDisplayNameMember","member","static","key","id","declarator","declarations","init","add","isPropsTypeDeclaration","isNonPropsTypeDeclaration","isOptionalVarDeclaration","isStyledDeclaration","isStyledFactoryDeclaration","sectionForStatement","isDisplayNameAssignment","isComponentExport","getStatementName","first","declaration","names","specifiers","specifier","local","Program","lastSection","lastSectionName","hasDisplayName","hasNamedExport","report","data","current","currentName","order","previous","previousName","messageId","node"],"mappings":";;;AAgBA,MAAMA,YAAU,GAAGC,WAAW,CAACC,WAAW,CACtCC,IAAI,IAAI,CAAA,kEAAA,EAAqEA,IAAI,CAAA,GAAA,CACrF,CAAC;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