Skip to content

Commit fea2e86

Browse files
committed
chore: bump @griffel/eslint-plugin & enable @griffel/hook-naming
1 parent 3a6bbb0 commit fea2e86

9 files changed

Lines changed: 77 additions & 60 deletions

File tree

apps/public-docsite-v9/src/Concepts/Migration/FromV8/Components/Slider/Sliderv9Examples.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const V9ControlledExample = () => {
3333
);
3434
};
3535

36-
const getFormattedExampleStyles = makeStyles({
36+
const useGetFormattedExampleStyles = makeStyles({
3737
wrapper: {
3838
display: 'grid',
3939
alignItems: 'center',
@@ -43,7 +43,7 @@ const getFormattedExampleStyles = makeStyles({
4343
});
4444

4545
export const V9FormattedValueExample = () => {
46-
const styles = getFormattedExampleStyles();
46+
const styles = useGetFormattedExampleStyles();
4747
const [sliderValue, setSliderValue] = React.useState(0);
4848
const sliderOnChange: SliderProps['onChange'] = (ev, data) => setSliderValue(data.value);
4949
const formattedId = useId();
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "feat: enable @griffel/hook-naming rule",
4+
"packageName": "@fluentui/eslint-plugin",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"@cypress/webpack-dev-server": "1.8.3",
9090
"@fluentui/react-icons": "^2.0.196",
9191
"@griffel/babel-preset": "1.4.8",
92-
"@griffel/eslint-plugin": "1.0.0",
92+
"@griffel/eslint-plugin": "^1.2.0",
9393
"@griffel/jest-serializer": "1.1.4",
9494
"@griffel/react": "^1.5.2",
9595
"@griffel/webpack-extraction-plugin": "0.3.3",

packages/eslint-plugin/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"test": "yarn jest --passWithNoTests"
1414
},
1515
"dependencies": {
16+
"@griffel/eslint-plugin": "^1.2.0",
1617
"@rnx-kit/eslint-plugin": "^0.2.5",
1718
"@typescript-eslint/eslint-plugin": "^4.22.0",
1819
"@typescript-eslint/experimental-utils": "^4.22.0",

packages/eslint-plugin/src/configs/react-config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ module.exports = {
2525
* griffel eslint rules
2626
* @see https://github.com/microsoft/griffel/tree/main/packages/eslint-plugin
2727
*/
28+
'@griffel/hook-naming': 'error',
2829
'@griffel/no-shorthands': 'error',
2930
/**
3031
* react eslint rules

scripts/generators/create-component/plop-templates/src/components/{{componentName}}/index.ts.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export * from './{{componentName}}';
22
export * from './{{componentName}}.types';
33
export * from './render{{componentName}}';
44
export * from './use{{componentName}}';
5-
export * from './use{{componentName}}Styles';
5+
export * from './use{{componentName}}Styles.styles';

scripts/generators/create-component/plop-templates/src/components/{{componentName}}/use{{componentName}}Styles.ts.hbs renamed to scripts/generators/create-component/plop-templates/src/components/{{componentName}}/use{{componentName}}Styles.styles.ts.hbs

File renamed without changes.

scripts/generators/create-component/plop-templates/src/components/{{componentName}}/{{componentName}}.tsx.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import { use{{componentName}}_unstable } from './use{{componentName}}';
33
import { render{{componentName}}_unstable } from './render{{componentName}}';
4-
import { use{{componentName}}Styles_unstable } from './use{{componentName}}Styles';
4+
import { use{{componentName}}Styles_unstable } from './use{{componentName}}Styles.styles';
55
import type { {{componentName}}Props } from './{{componentName}}.types';
66
import type { ForwardRefComponent } from '@fluentui/react-utilities';
77

yarn.lock

Lines changed: 63 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,6 +1603,13 @@
16031603
esquery "^1.4.0"
16041604
jsdoc-type-pratt-parser "1.1.1"
16051605

1606+
"@eslint-community/eslint-utils@^4.2.0":
1607+
version "4.4.0"
1608+
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
1609+
integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
1610+
dependencies:
1611+
eslint-visitor-keys "^3.3.0"
1612+
16061613
"@eslint/eslintrc@^0.4.0":
16071614
version "0.4.3"
16081615
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c"
@@ -1678,13 +1685,14 @@
16781685
stylis "^4.0.13"
16791686
tslib "^2.1.0"
16801687

1681-
"@griffel/eslint-plugin@1.0.0":
1682-
version "1.0.0"
1683-
resolved "https://registry.yarnpkg.com/@griffel/eslint-plugin/-/eslint-plugin-1.0.0.tgz#cba251b7a140399c6686b72a72e9fa2ee481f532"
1684-
integrity sha512-I8oQcyTdcPmOqX4Ti7FVP8fTJRneQBhzNf6eh8ce7avvVF7YOkiIg+Qu9dVvXSR/BxkY/Ncs8CGtUV++kTBx0g==
1688+
"@griffel/eslint-plugin@^1.2.0":
1689+
version "1.2.0"
1690+
resolved "https://registry.yarnpkg.com/@griffel/eslint-plugin/-/eslint-plugin-1.2.0.tgz#a4e211c16b4d3f0cdb90b47c5af1dce191b10bd4"
1691+
integrity sha512-ThqQR1UIeM+WZH1z8RUrKHCDuSXrFEwRIL4nX0UmBZznV/36DiGzODOQl6ZoZ9eCGoGYxTnl6riwy/1cB/0yGA==
16851692
dependencies:
1686-
"@typescript-eslint/utils" "^5.20.0"
1687-
csstype "^3.0.10"
1693+
"@typescript-eslint/utils" "^5.47.0"
1694+
csstype "^3.1.2"
1695+
tslib "^2.1.0"
16881696

16891697
"@griffel/[email protected]":
16901698
version "1.1.4"
@@ -5995,6 +6003,11 @@
59956003
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-6.2.3.tgz#5798ecf1bec94eaa64db39ee52808ec0693315aa"
59966004
integrity sha512-KQf+QAMWKMrtBMsB8/24w53tEsxllMj6TuA80TT/5igJalLI/zm0L3oXRbIAl4Ohfc85gyHX/jhMwsVkmhLU4A==
59976005

6006+
"@types/semver@^7.3.12":
6007+
version "7.3.13"
6008+
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91"
6009+
integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==
6010+
59986011
"@types/serve-index@^1.9.1":
59996012
version "1.9.1"
60006013
resolved "https://registry.yarnpkg.com/@types/serve-index/-/serve-index-1.9.1.tgz#1b5e85370a192c01ec6cec4735cf2917337a6278"
@@ -6279,23 +6292,23 @@
62796292
"@typescript-eslint/types" "4.22.0"
62806293
"@typescript-eslint/visitor-keys" "4.22.0"
62816294

6282-
"@typescript-eslint/scope-manager@5.23.0":
6283-
version "5.23.0"
6284-
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.23.0.tgz#4305e61c2c8e3cfa3787d30f54e79430cc17ce1b"
6285-
integrity sha512-EhjaFELQHCRb5wTwlGsNMvzK9b8Oco4aYNleeDlNuL6qXWDF47ch4EhVNPh8Rdhf9tmqbN4sWDk/8g+Z/J8JVw==
6295+
"@typescript-eslint/scope-manager@5.59.1":
6296+
version "5.59.1"
6297+
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.59.1.tgz#8a20222719cebc5198618a5d44113705b51fd7fe"
6298+
integrity sha512-mau0waO5frJctPuAzcxiNWqJR5Z8V0190FTSqRw1Q4Euop6+zTwHAf8YIXNwDOT29tyUDrQ65jSg9aTU/H0omA==
62866299
dependencies:
6287-
"@typescript-eslint/types" "5.23.0"
6288-
"@typescript-eslint/visitor-keys" "5.23.0"
6300+
"@typescript-eslint/types" "5.59.1"
6301+
"@typescript-eslint/visitor-keys" "5.59.1"
62896302

62906303
"@typescript-eslint/[email protected]":
62916304
version "4.22.0"
62926305
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.22.0.tgz#0ca6fde5b68daf6dba133f30959cc0688c8dd0b6"
62936306
integrity sha512-sW/BiXmmyMqDPO2kpOhSy2Py5w6KvRRsKZnV0c4+0nr4GIcedJwXAq+RHNK4lLVEZAJYFltnnk1tJSlbeS9lYA==
62946307

6295-
"@typescript-eslint/types@5.23.0":
6296-
version "5.23.0"
6297-
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.23.0.tgz#8733de0f58ae0ed318dbdd8f09868cdbf9f9ad09"
6298-
integrity sha512-NfBsV/h4dir/8mJwdZz7JFibaKC3E/QdeMEDJhiAE3/eMkoniZ7MjbEMCGXw6MZnZDMN3G9S0mH/6WUIj91dmw==
6308+
"@typescript-eslint/types@5.59.1":
6309+
version "5.59.1"
6310+
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.1.tgz#03f3fedd1c044cb336ebc34cc7855f121991f41d"
6311+
integrity sha512-dg0ICB+RZwHlysIy/Dh1SP+gnXNzwd/KS0JprD3Lmgmdq+dJAJnUPe1gNG34p0U19HvRlGX733d/KqscrGC1Pg==
62996312

63006313
"@typescript-eslint/[email protected]":
63016314
version "4.22.0"
@@ -6310,30 +6323,32 @@
63106323
semver "^7.3.2"
63116324
tsutils "^3.17.1"
63126325

6313-
"@typescript-eslint/typescript-estree@5.23.0":
6314-
version "5.23.0"
6315-
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.23.0.tgz#dca5f10a0a85226db0796e8ad86addc9aee52065"
6316-
integrity sha512-xE9e0lrHhI647SlGMl+m+3E3CKPF1wzvvOEWnuE3CCjjT7UiRnDGJxmAcVKJIlFgK6DY9RB98eLr1OPigPEOGg==
6326+
"@typescript-eslint/typescript-estree@5.59.1":
6327+
version "5.59.1"
6328+
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.1.tgz#4aa546d27fd0d477c618f0ca00b483f0ec84c43c"
6329+
integrity sha512-lYLBBOCsFltFy7XVqzX0Ju+Lh3WPIAWxYpmH/Q7ZoqzbscLiCW00LeYCdsUnnfnj29/s1WovXKh2gwCoinHNGA==
63176330
dependencies:
6318-
"@typescript-eslint/types" "5.23.0"
6319-
"@typescript-eslint/visitor-keys" "5.23.0"
6320-
debug "^4.3.2"
6321-
globby "^11.0.4"
6331+
"@typescript-eslint/types" "5.59.1"
6332+
"@typescript-eslint/visitor-keys" "5.59.1"
6333+
debug "^4.3.4"
6334+
globby "^11.1.0"
63226335
is-glob "^4.0.3"
6323-
semver "^7.3.5"
6336+
semver "^7.3.7"
63246337
tsutils "^3.21.0"
63256338

6326-
"@typescript-eslint/utils@^5.20.0":
6327-
version "5.23.0"
6328-
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.23.0.tgz#4691c3d1b414da2c53d8943310df36ab1c50648a"
6329-
integrity sha512-dbgaKN21drqpkbbedGMNPCtRPZo1IOUr5EI9Jrrh99r5UW5Q0dz46RKXeSBoPV+56R6dFKpbrdhgUNSJsDDRZA==
6339+
"@typescript-eslint/utils@^5.47.0":
6340+
version "5.59.1"
6341+
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.59.1.tgz#d89fc758ad23d2157cfae53f0b429bdf15db9473"
6342+
integrity sha512-MkTe7FE+K1/GxZkP5gRj3rCztg45bEhsd8HYjczBuYm+qFHP5vtZmjx3B0yUCDotceQ4sHgTyz60Ycl225njmA==
63306343
dependencies:
6344+
"@eslint-community/eslint-utils" "^4.2.0"
63316345
"@types/json-schema" "^7.0.9"
6332-
"@typescript-eslint/scope-manager" "5.23.0"
6333-
"@typescript-eslint/types" "5.23.0"
6334-
"@typescript-eslint/typescript-estree" "5.23.0"
6346+
"@types/semver" "^7.3.12"
6347+
"@typescript-eslint/scope-manager" "5.59.1"
6348+
"@typescript-eslint/types" "5.59.1"
6349+
"@typescript-eslint/typescript-estree" "5.59.1"
63356350
eslint-scope "^5.1.1"
6336-
eslint-utils "^3.0.0"
6351+
semver "^7.3.7"
63376352

63386353
"@typescript-eslint/[email protected]":
63396354
version "4.22.0"
@@ -6343,13 +6358,13 @@
63436358
"@typescript-eslint/types" "4.22.0"
63446359
eslint-visitor-keys "^2.0.0"
63456360

6346-
"@typescript-eslint/visitor-keys@5.23.0":
6347-
version "5.23.0"
6348-
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.23.0.tgz#057c60a7ca64667a39f991473059377a8067c87b"
6349-
integrity sha512-Vd4mFNchU62sJB8pX19ZSPog05B0Y0CE2UxAZPT5k4iqhRYjPnqyY3woMxCd0++t9OTqkgjST+1ydLBi7e2Fvg==
6361+
"@typescript-eslint/visitor-keys@5.59.1":
6362+
version "5.59.1"
6363+
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.1.tgz#0d96c36efb6560d7fb8eb85de10442c10d8f6058"
6364+
integrity sha512-6waEYwBTCWryx0VJmP7JaM4FpipLsFl9CvYf2foAE8Qh/Y0s+bxWysciwOs0LTBED4JCaNxTZ5rGadB14M6dwA==
63506365
dependencies:
6351-
"@typescript-eslint/types" "5.23.0"
6352-
eslint-visitor-keys "^3.0.0"
6366+
"@typescript-eslint/types" "5.59.1"
6367+
eslint-visitor-keys "^3.3.0"
63536368

63546369
"@uifabric/set-version@^7.0.23":
63556370
version "7.0.23"
@@ -10332,10 +10347,10 @@ csstype@^2.5.5, csstype@^2.5.7, csstype@^2.6.7:
1033210347
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.19.tgz#feeb5aae89020bb389e1f63669a5ed490e391caa"
1033310348
integrity sha512-ZVxXaNy28/k3kJg0Fou5MiYpp88j7H9hLZp8PDC3jV0WFjfH5E9xHb56L0W59cPbKbcHXeP4qyT8PrHp8t6LcQ==
1033410349

10335-
csstype@^3.0.10, csstype@^3.0.2:
10336-
version "3.0.11"
10337-
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.11.tgz#d66700c5eacfac1940deb4e3ee5642792d85cd33"
10338-
integrity sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==
10350+
csstype@^3.0.10, csstype@^3.0.2, csstype@^3.1.2:
10351+
version "3.1.2"
10352+
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b"
10353+
integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==
1033910354

1034010355
csv-stringify@^6.2.0:
1034110356
version "6.2.0"
@@ -12296,13 +12311,6 @@ eslint-utils@^2.0.0, eslint-utils@^2.1.0:
1229612311
dependencies:
1229712312
eslint-visitor-keys "^1.1.0"
1229812313

12299-
eslint-utils@^3.0.0:
12300-
version "3.0.0"
12301-
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672"
12302-
integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==
12303-
dependencies:
12304-
eslint-visitor-keys "^2.0.0"
12305-
1230612314
eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0:
1230712315
version "1.3.0"
1230812316
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
@@ -12313,10 +12321,10 @@ eslint-visitor-keys@^2.0.0:
1231312321
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8"
1231412322
integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==
1231512323

12316-
eslint-visitor-keys@^3.0.0:
12317-
version "3.3.0"
12318-
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826"
12319-
integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==
12324+
eslint-visitor-keys@^3.3.0:
12325+
version "3.4.0"
12326+
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz#c7f0f956124ce677047ddbc192a68f999454dedc"
12327+
integrity sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==
1232012328

1232112329
1232212330
version "7.25.0"
@@ -14149,7 +14157,7 @@ globalthis@^1.0.0:
1414914157
function-bind "^1.1.1"
1415014158
object-keys "^1.0.12"
1415114159

14152-
globby@*, globby@^11.0.0, globby@^11.0.1, globby@^11.0.2, globby@^11.0.3, globby@^11.0.4:
14160+
globby@*, globby@^11.0.0, globby@^11.0.1, globby@^11.0.2, globby@^11.0.3, globby@^11.1.0:
1415314161
version "11.1.0"
1415414162
resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b"
1415514163
integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==

0 commit comments

Comments
 (0)