Skip to content

Commit

Permalink
Merge branch 'main' into chore/update-babel-7.21
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblack authored Mar 14, 2023
2 parents 2cfe914 + 0f35625 commit a446f44
Show file tree
Hide file tree
Showing 234 changed files with 7,488 additions and 5,025 deletions.
5 changes: 0 additions & 5 deletions .changeset/calm-moons-serve.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/cuddly-cycles-refuse.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/dry-cows-try.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/dry-turtles-sing.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/eighty-beers-warn.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fair-lobsters-sin.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/great-vans-bathe.md
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
5 changes: 0 additions & 5 deletions .changeset/khaki-readers-drop.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/large-guests-sip.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/long-bags-double.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/many-bears-bake.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/metal-ants-punch.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/rotten-hats-wonder.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/seven-ears-know.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/silly-plants-draw.md
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
5 changes: 0 additions & 5 deletions .changeset/sour-melons-wait.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/spotty-beers-cheer.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/strong-doors-begin.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/violet-phones-notice.md
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
231 changes: 231 additions & 0 deletions .eslintrc.js
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',
},
},
],
}
Loading

0 comments on commit a446f44

Please sign in to comment.