-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(eslint-plugin): add browser compatibility plugin #33786
base: master
Are you sure you want to change the base?
Changes from all commits
7e1570c
63ec236
e7e3c9f
311672c
70fdcaa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,7 @@ | ||||||||||||||||||||
{ | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🕵🏾♀️ visual regressions to review in the fluentui-web-components-v3 Visual Regression ReportBadge 1 screenshots
Checkbox 1 screenshots
Divider 1 screenshots
|
||||||||||||||||||||
"type": "minor", | ||||||||||||||||||||
"comment": "feat: add browser compatibility plugin", | ||||||||||||||||||||
"packageName": "@fluentui/eslint-plugin", | ||||||||||||||||||||
"email": "[email protected]", | ||||||||||||||||||||
"dependentChangeType": "minor" | ||||||||||||||||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,16 @@ | |
|
||
const path = require('path'); | ||
|
||
const { getNamingConventionRule } = require('../utils/configHelpers'); | ||
const { getNamingConventionRule, testFiles, storyFiles } = require('../utils/configHelpers'); | ||
|
||
/** @type {import("eslint").Linter.Config} */ | ||
module.exports = { | ||
extends: [path.join(__dirname, 'core')], | ||
extends: [ | ||
path.join(__dirname, 'core'), | ||
// Browser compatibility linter rules | ||
'plugin:compat/recommended', | ||
], | ||
plugins: ['compat'], | ||
rules: { | ||
/** | ||
* `@typescript-eslint`plugin eslint rules | ||
|
@@ -24,5 +29,28 @@ module.exports = { | |
'@rnx-kit/no-export-all': ['error', { expand: 'all' }], | ||
}, | ||
}, | ||
{ | ||
files: [...testFiles, ...storyFiles], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm adding it to overrides would be easier for future migration to flat configs and also would make it more readable as exclude + include would be part of same config
WDYT ? |
||
rules: { | ||
'compat/compat': 'off', | ||
}, | ||
}, | ||
], | ||
settings: { | ||
// Browser matrix support - https://react.fluentui.dev/?path=/docs/concepts-developer-browser-support-matrix--docs#partial-browser-support-matrix | ||
targets: [ | ||
// Desktop browsers | ||
'edge >= 79', | ||
'firefox >= 69', | ||
'chrome >= 79', | ||
'safari >= 13.1', | ||
'opera >= 64', | ||
'not ie <= 11', | ||
// Mobile browsers | ||
'ios_saf >= 13.4', | ||
'android >= 79', | ||
'samsung >= 14', | ||
'not op_mini all', | ||
], | ||
}, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2448,6 +2448,11 @@ | |
resolved "https://registry.yarnpkg.com/@linaria/utils/-/utils-3.0.0-beta.20.tgz#0965df816120a1973c4559b746571c01c6cb9bef" | ||
integrity sha512-SKRC9dBApzu0kTksVtGZ7eJz1vMu7xew/JEAjQj6XTQDblzWpTPyKQHBOGXNkqXjIB8PwAqWfvKzKapzaOwQaQ== | ||
|
||
"@mdn/browser-compat-data@^5.5.35", "@mdn/browser-compat-data@^5.6.19": | ||
version "5.6.36" | ||
resolved "https://registry.yarnpkg.com/@mdn/browser-compat-data/-/browser-compat-data-5.6.36.tgz#209c3a37aa1b2cbd503cfa7bb0755084a50cc1ff" | ||
integrity sha512-UhTBGnR9L8x1hpCA/VlVxwY8CXfyWPoTDAlWz5n1iwJxDaiqA0XkTfi5p6FuHMHE/EuUUtfiSIu14nzQUtJPDg== | ||
|
||
"@mdx-js/[email protected]": | ||
version "2.3.0" | ||
resolved "https://registry.yarnpkg.com/@mdx-js/loader/-/loader-2.3.0.tgz#56a6b07eb0027b6407e953a97c52bd8619601161" | ||
|
@@ -7167,6 +7172,13 @@ assign-symbols@^1.0.0: | |
resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" | ||
integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= | ||
|
||
ast-metadata-inferer@^0.8.1: | ||
version "0.8.1" | ||
resolved "https://registry.yarnpkg.com/ast-metadata-inferer/-/ast-metadata-inferer-0.8.1.tgz#85081bf30308acd4c35fb8694658b4c5f6f3ee60" | ||
integrity sha512-ht3Dm6Zr7SXv6t1Ra6gFo0+kLDglHGrEbYihTkcycrbHw7WCcuhBzPlJYHEsIpycaUwzsJHje+vUcxXUX4ztTA== | ||
dependencies: | ||
"@mdn/browser-compat-data" "^5.6.19" | ||
|
||
ast-types-flow@^0.0.8: | ||
version "0.0.8" | ||
resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.8.tgz#0a85e1c92695769ac13a428bb653e7538bea27d6" | ||
|
@@ -7844,15 +7856,15 @@ browserify-zlib@^0.1.4: | |
dependencies: | ||
pako "~0.2.0" | ||
|
||
browserslist@^4.16.1, browserslist@^4.21.10, browserslist@^4.23.0, browserslist@^4.23.1: | ||
version "4.23.2" | ||
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.2.tgz#244fe803641f1c19c28c48c4b6ec9736eb3d32ed" | ||
integrity sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA== | ||
browserslist@^4.16.1, browserslist@^4.21.10, browserslist@^4.23.0, browserslist@^4.23.1, browserslist@^4.24.2: | ||
version "4.24.4" | ||
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.4.tgz#c6b2865a3f08bcb860a0e827389003b9fe686e4b" | ||
integrity sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A== | ||
dependencies: | ||
caniuse-lite "^1.0.30001640" | ||
electron-to-chromium "^1.4.820" | ||
node-releases "^2.0.14" | ||
update-browserslist-db "^1.1.0" | ||
caniuse-lite "^1.0.30001688" | ||
electron-to-chromium "^1.5.73" | ||
node-releases "^2.0.19" | ||
update-browserslist-db "^1.1.1" | ||
|
||
bs-logger@^0.2.6: | ||
version "0.2.6" | ||
|
@@ -8080,7 +8092,7 @@ camelcase@^6.0.0, camelcase@^6.2.0: | |
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.1.tgz#250fd350cfd555d0d2160b1d51510eaf8326e86e" | ||
integrity sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA== | ||
|
||
caniuse-lite@^1.0.30001173, caniuse-lite@^1.0.30001640: | ||
caniuse-lite@^1.0.30001173, caniuse-lite@^1.0.30001687, caniuse-lite@^1.0.30001688: | ||
version "1.0.30001699" | ||
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001699.tgz" | ||
integrity sha512-b+uH5BakXZ9Do9iK+CkDmctUSEqZl+SP056vc5usa0PL+ev5OHw003rZXcnjNDv3L8P5j6rwT6C0BPKSikW08w== | ||
|
@@ -10418,10 +10430,10 @@ [email protected]: | |
dependencies: | ||
jake "^10.8.5" | ||
|
||
electron-to-chromium@^1.4.820: | ||
version "1.5.4" | ||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.4.tgz#cd477c830dd6fca41fbd5465c1ff6ce08ac22343" | ||
integrity sha512-orzA81VqLyIGUEA77YkVA1D+N+nNfl2isJVjjmOyrlxuooZ19ynb+dOlaDTqd/idKRS9lDCSBmtzM+kyCsMnkA== | ||
electron-to-chromium@^1.5.73: | ||
version "1.5.92" | ||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.92.tgz#81e8ebe06f8e2a49fdba84bd10e9ad5b63efffe0" | ||
integrity sha512-BeHgmNobs05N1HMmMZ7YIuHfYBGlq/UmvlsTgg+fsbFs9xVMj+xJHFg19GN04+9Q+r8Xnh9LXqaYIyEWElnNgQ== | ||
|
||
[email protected], embla-carousel-autoplay@^8.5.1: | ||
version "8.5.1" | ||
|
@@ -10923,6 +10935,20 @@ eslint-module-utils@^2.7.4, eslint-module-utils@^2.8.0: | |
dependencies: | ||
debug "^3.2.7" | ||
|
||
[email protected], eslint-plugin-compat@^6.0.2: | ||
version "6.0.2" | ||
resolved "https://registry.yarnpkg.com/eslint-plugin-compat/-/eslint-plugin-compat-6.0.2.tgz#34840c97047b58f1ae012d61a46abb09af7bb0ab" | ||
integrity sha512-1ME+YfJjmOz1blH0nPZpHgjMGK4kjgEeoYqGCqoBPQ/mGu/dJzdoP0f1C8H2jcWZjzhZjAMccbM/VdXhPORIfA== | ||
dependencies: | ||
"@mdn/browser-compat-data" "^5.5.35" | ||
ast-metadata-inferer "^0.8.1" | ||
browserslist "^4.24.2" | ||
caniuse-lite "^1.0.30001687" | ||
find-up "^5.0.0" | ||
globals "^15.7.0" | ||
lodash.memoize "^4.1.2" | ||
semver "^7.6.2" | ||
|
||
[email protected]: | ||
version "4.1.0" | ||
resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz#f0822f0c18a535a97c3e714e89f88586a7641ec9" | ||
|
@@ -12857,10 +12883,10 @@ globals@^11.1.0: | |
resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" | ||
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== | ||
|
||
globals@^15.9.0: | ||
version "15.9.0" | ||
resolved "https://registry.yarnpkg.com/globals/-/globals-15.9.0.tgz#e9de01771091ffbc37db5714dab484f9f69ff399" | ||
integrity sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA== | ||
globals@^15.7.0, globals@^15.9.0: | ||
version "15.14.0" | ||
resolved "https://registry.yarnpkg.com/globals/-/globals-15.14.0.tgz#b8fd3a8941ff3b4d38f3319d433b61bbb482e73f" | ||
integrity sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig== | ||
|
||
globalthis@^1.0.3: | ||
version "1.0.4" | ||
|
@@ -17842,10 +17868,10 @@ [email protected], node-plop@~0.25.0: | |
mkdirp "^0.5.1" | ||
resolve "^1.12.0" | ||
|
||
node-releases@^2.0.14: | ||
version "2.0.14" | ||
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" | ||
integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== | ||
node-releases@^2.0.19: | ||
version "2.0.19" | ||
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.19.tgz#9e445a52950951ec4d177d843af370b411caf314" | ||
integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw== | ||
|
||
normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: | ||
version "2.5.0" | ||
|
@@ -23438,7 +23464,7 @@ upath@^1.1.1: | |
resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068" | ||
integrity sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q== | ||
|
||
update-browserslist-db@^1.1.0: | ||
update-browserslist-db@^1.1.1: | ||
version "1.1.2" | ||
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz#97e9c96ab0ae7bcac08e9ae5151d26e6bc6b5580" | ||
integrity sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg== | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕵🏾♀️ visual regressions to review in the fluentuiv8 Visual Regression Report
react-charting-AreaChart 1 screenshots
react-charting-HeatMapChart 1 screenshots
react-charting-LineChart 1 screenshots