-
Notifications
You must be signed in to change notification settings - Fork 536
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:primer/react into feat/add-alphanum…
…eric-sort
- Loading branch information
Showing
271 changed files
with
7,766 additions
and
5,182 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@primer/react': minor | ||
--- | ||
|
||
Add babel-plugin-dev-expression to transform warning calls in package bundle |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/react": patch | ||
--- | ||
|
||
Recalculate autocomplete suggestions if the input data changes while the menu is open |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@primer/react': patch | ||
--- | ||
|
||
SegmentedControl: Resolve axe-violation by adding a discernible text to the icon button and removing the tooltip until it is marked as accessible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,231 @@ | ||
'use strict' | ||
|
||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
extends: [ | ||
'plugin:react/recommended', | ||
'plugin:jsx-a11y/recommended', | ||
'plugin:react-hooks/recommended', | ||
'plugin:prettier/recommended', | ||
'plugin:github/recommended', | ||
'plugin:github/browser', | ||
'plugin:primer-react/recommended', | ||
'plugin:import/typescript', | ||
], | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
'import/parsers': { | ||
'@typescript-eslint/parser': ['.js', '.jsx', '.ts', '.tsx'], | ||
'eslint-mdx': ['.mdx'], | ||
}, | ||
'import/resolver': { | ||
node: true, | ||
typescript: true, | ||
}, | ||
}, | ||
ignorePatterns: [ | ||
'node_modules', | ||
'.cache', | ||
'coverage/**/*', | ||
'docs/public/**/*', | ||
'dist/**/*', | ||
'lib/**/*', | ||
'lib-*/**/*', | ||
'types/**/*', | ||
'consumer-test/**/*', | ||
'contributor-docs/adrs/*', | ||
'examples/nextjs/**', | ||
// Note: this file is inlined from an external dependency | ||
'src/utils/polymorphic.ts', | ||
'storybook-static', | ||
'CHANGELOG.md', | ||
], | ||
globals: { | ||
__DEV__: 'readonly', | ||
}, | ||
env: { | ||
browser: true, | ||
commonjs: true, | ||
es6: true, | ||
jest: true, | ||
node: true, | ||
}, | ||
// rules which apply to JS, TS, etc. | ||
rules: { | ||
'no-shadow': 'off', | ||
'react/prop-types': 'off', | ||
'react/display-name': 'off', | ||
'react-hooks/exhaustive-deps': 'error', | ||
'jsx-a11y/label-has-for': [ | ||
2, | ||
{ | ||
components: [], | ||
}, | ||
], | ||
camelcase: [ | ||
'error', | ||
{ | ||
allow: ['dark_dimmed'], | ||
}, | ||
], | ||
'primer-react/no-deprecated-colors': ['warn', {checkAllStrings: true}], | ||
|
||
// Overrides from updating plugin:github | ||
'filenames/match-regex': 'off', | ||
'import/extensions': 'off', | ||
'import/namespace': 'off', | ||
'import/no-commonjs': 'off', | ||
'import/no-nodejs-modules': 'off', | ||
'import/no-dynamic-require': 'off', | ||
'import/no-unresolved': 'off', | ||
'i18n-text/no-en': 'off', | ||
'github/no-inner-html': 'off', | ||
'github/role-supports-aria-props': 'off', | ||
'no-restricted-syntax': 'off', | ||
}, | ||
overrides: [ | ||
// rules which apply only to JS | ||
{ | ||
files: ['**/*.{js,jsx}'], | ||
rules: { | ||
'eslint-comments/no-use': 'off', | ||
'import/no-namespace': 'off', | ||
'import/no-named-as-default': 'off', | ||
'import/no-named-as-default-member': 'off', | ||
'no-unused-vars': [ | ||
'error', | ||
{ | ||
ignoreRestSiblings: true, | ||
}, | ||
], | ||
}, | ||
}, | ||
|
||
// rules which apply only to TS | ||
{ | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
}, | ||
files: ['**/*.{ts,tsx}'], | ||
extends: ['plugin:@typescript-eslint/recommended'], | ||
rules: { | ||
'@typescript-eslint/no-explicit-any': 2, | ||
'@typescript-eslint/no-unnecessary-condition': 2, | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
argsIgnorePattern: '^_', | ||
}, | ||
], | ||
'@typscript-eslint/no-shadow': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'@typescript-eslint/ban-ts-comment': [ | ||
'error', | ||
{ | ||
'ts-ignore': 'allow-with-description', | ||
}, | ||
], | ||
'import/default': 'off', | ||
'import/no-deprecated': 'off', | ||
'import/no-named-as-default': 'off', | ||
'import/no-named-as-default-member': 'off', | ||
'no-restricted-imports': [ | ||
'error', | ||
{ | ||
paths: [ | ||
{ | ||
name: '@react-aria/ssr', | ||
importNames: ['useSSRSafeId'], | ||
message: 'Please use the `useId` hook from `src/hooks/useId.ts` instead', | ||
}, | ||
], | ||
patterns: [], | ||
}, | ||
], | ||
}, | ||
}, | ||
|
||
// Tests | ||
{ | ||
files: ['src/**/*.test.{ts,tsx}'], | ||
extends: ['plugin:jest/recommended'], | ||
rules: { | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'jest/expect-expect': 'off', | ||
'jest/no-conditional-expect': 'off', | ||
'jest/no-disabled-tests': 'off', | ||
}, | ||
}, | ||
|
||
// Stories | ||
{ | ||
files: ['**/*.stories.{ts,tsx}'], | ||
extends: ['plugin:storybook/recommended'], | ||
rules: {}, | ||
}, | ||
|
||
// e2e tests | ||
{ | ||
files: ['playwright.config.ts', 'e2e/**/*.{ts,tsx}'], | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
}, | ||
rules: { | ||
'github/array-foreach': 'off', | ||
}, | ||
}, | ||
|
||
// rules which apply only to Markdown | ||
{ | ||
files: ['**/*.{md,mdx}'], | ||
extends: ['plugin:mdx/recommended'], | ||
settings: { | ||
'mdx/code-blocks': true, | ||
}, | ||
rules: { | ||
'no-unused-vars': 'off', | ||
'prettier/prettier': 'off', | ||
'react/jsx-no-undef': 'off', | ||
}, | ||
}, | ||
|
||
// rules which apply only to Markdown code blocks | ||
{ | ||
files: ['**/*.{md,mdx}/**'], | ||
parserOptions: { | ||
project: false, | ||
}, | ||
rules: { | ||
camelcase: 'off', | ||
'no-constant-condition': 'off', | ||
'no-console': 'off', | ||
'no-empty-pattern': 'off', | ||
'no-unused-vars': 'off', | ||
'no-undef': 'off', | ||
'react/no-unescaped-entities': 'off', | ||
'react/react-in-jsx-scope': 'off', | ||
'react/jsx-no-undef': 'off', | ||
'react/jsx-key': 'off', | ||
'react/jsx-no-comment-textnodes': 'off', | ||
'import/no-anonymous-default-export': 'off', | ||
'prettier/prettier': 'off', | ||
// These a11y rules should eventually be re-enabled | ||
'jsx-a11y/anchor-is-valid': 'off', | ||
'jsx-a11y/accessible-emoji': 'off', | ||
'jsx-a11y/label-has-for': 'off', | ||
'@typescript-eslint/no-unnecessary-condition': 'off', | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'primer-react/no-deprecated-colors': ['error', {skipImportCheck: true}], | ||
'no-redeclare': 'off', | ||
}, | ||
}, | ||
], | ||
} |
Oops, something went wrong.