Skip to content

Commit

Permalink
Merge pull request #867 from WTW-IM/pre-prod
Browse files Browse the repository at this point in the history
  • Loading branch information
stevematney authored Nov 20, 2024
2 parents 91c540d + 48fb295 commit 11e1a96
Show file tree
Hide file tree
Showing 19 changed files with 1,549 additions and 1,572 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ jobs:
--output-file eslint_report.json \
--format json \
--no-error-on-unmatched-pattern \
$(git diff ${{ github.base_ref }} --name-only --relative)
--cache \
$(git diff origin/${{ github.base_ref }} --name-only --relative)
- name: Annotate JS Linting Results
if: ${{ github.event_name == 'pull_request_target' }}
Expand Down
File renamed without changes.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [21.14.2-pre-prod.0](https://github.com/WTW-IM/es-components/compare/v21.14.1...v21.14.2-pre-prod.0) (2024-11-20)

### Build

- fixing branch ref in CI ([961d943](https://github.com/WTW-IM/es-components/commit/961d94344584eb3100c54a864a9f3a09dfa4c938))
- updating eslint to latest w/ flat config ([129dc21](https://github.com/WTW-IM/es-components/commit/129dc2141ea0052800fe3eac58820a0747392fb5))
- using React.createElement for JSX ([de2b7fd](https://github.com/WTW-IM/es-components/commit/de2b7fd0c8b68456cb6671ed0d881e44213ff4ba))

### Fix

- ensuring we don't have warnings from withLoadingStateWhileRunning ([cffe753](https://github.com/WTW-IM/es-components/commit/cffe7538edcc3b9dbcf56d53e6aff1a3970b5ab2))

## [21.14.1](https://github.com/WTW-IM/es-components/compare/v21.14.1-pre-prod.2...v21.14.1) (2024-11-12)

**Note:** Version bump only for package es-components-monorepo
Expand Down
219 changes: 219 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import importPlugin from 'eslint-plugin-import';
import reactPlugin from 'eslint-plugin-react';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
import cypressPlugin from 'eslint-plugin-cypress/flat';
import jestPlugin from 'eslint-plugin-jest';
import testingLibraryPlugin from 'eslint-plugin-testing-library';
import globals from 'globals';
import path from 'path';

const __dirname = path.dirname(new URL(import.meta.url).pathname);

const plugins = {
react: reactPlugin,
'react-hooks': reactHooksPlugin
};

export default tseslint.config(
eslint.configs.recommended,
jsxA11yPlugin.flatConfigs.recommended,
reactPlugin.configs.flat.recommended,
importPlugin.flatConfigs.recommended,
importPlugin.flatConfigs.typescript,
tseslint.configs.eslintRecommended,
...tseslint.configs.recommendedTypeChecked,
{
ignores: [
'**/node_modules/',
'**/dist/',
'**/cjs/',
'**/lib/',
'**/bundle/',
'**/docs/',
'**/es-components/types/'
]
},
{
languageOptions: {
globals: {
...globals.browser,
...globals.es2021,
ASSETS_PATH: 'readonly'
},
ecmaVersion: 'latest',
parserOptions: {
ecmaFeatures: {
jsx: true
},
// project: [path.join(__dirname, 'base-lint-tsconfig.json')],
projectServices: true
}
},
plugins,
settings: {
react: {
version: 'detect'
},
'import/core-modules': ['es-components-shared-types'],
'import/resolver': {
node: true,
typescript: true
}
},
rules: {
...reactHooksPlugin.configs.recommended.rules,
'@typescript-eslint/no-unused-vars': ['warn'],
'@typescript-eslint/restrict-template-expressions': [
'error',
{ allowNumber: true, allowBoolean: true, allowNullish: true }
],
'no-undefined': 'off', // typescript handles this
'max-len': 0,
'jsx-a11y/img-uses-alt': 0,
'jsx-a11y/redundant-alt': 0,
'jsx-a11y/valid-aria-role': 0,
'import/prefer-default-export': 0,
'react/jsx-filename-extension': 0,
'import/no-named-as-default': 0,
'react/no-find-dom-node': 0,
'react/jsx-no-bind': 0,
'react/destructuring-assignment': 0,
'linebreak-style': 0,
'import/named': 0,
'import/namespace': 0, // typescript handles this
'import/default': 0, // typescript handles this
'import/no-named-as-default-member': 0, // typescript handles this
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'*.config.{js,jsx,mjs,ts,tsx}',
'**/config/*.{js,jsx,mjs,ts,tsx}',
'**/*.config.{js,jsx,mjs,ts,tsx}',
'**/*.specs.{js,jsx,ts,tsx}',
'**/test-utils.{js,jsx,ts,tsx}',
'**/styleguide/*.{js,jsx,ts,tsx}',
'**/cypress/**/*.js',
'**/global.d.ts',
'**/full-color-icons.tsx',
'**/workflow-helpers/*.{js,jsx,mjs,ts,tsx}'
]
}
],
'prefer-arrow-callback': 0,
'id-length': 0,
'react/no-unknown-property': ['error', { ignore: ['css'] }]
}
},
{
files: ['**/*-theme/**/*.{js,jsx,mjs,ts,tsx}'],
languageOptions: {
parserOptions: {
project: [path.join(__dirname, 'theme-tsconfig.json')],
projectServices: false
}
}
},
{
files: ['**/shared/types/**/*.{js,jsx,mjs,ts,tsx}'],
languageOptions: {
parserOptions: {
project: [path.join(__dirname, 'shared', 'types', 'tsconfig.json')],
projectServices: false
}
}
},
{
files: [
'**/es-components/src/*.{js,jsx,mjs,ts,tsx}',
'**/es-components/src/**/*.{js,jsx,mjs,ts,tsx}'
],
languageOptions: {
parserOptions: {
project: [
path.join(__dirname, 'packages', 'es-components', 'tsconfig.json')
],
projectServices: false
}
}
},
{
files: [
'**/es-components/config/*.{js,jsx,mjs,ts,tsx}',
'**/cypress.config.{js,jsx,mjs,ts,tsx}'
],
languageOptions: {
parserOptions: {
project: [path.join(__dirname, 'tsconfig.json')],
projectServices: false
}
}
},
{
files: [
'**/*.config.{js,jsx,mjs,ts,tsx}',
'**/config/*.{js,jsx,mjs,ts,tsx}',
'**/build-scripts/*.{js,jsx,mjs,ts,tsx}',
'**/test-utils.{js,jsx,mjs,ts,tsx}',
'**/build-utils/*.{js,jsx,mjs,ts,tsx}',
'**/workflow-helpers/*.{js,jsx,mjs,ts,tsx}',
'**/.prettierrc.{js,jsx,mjs,ts,tsx}'
],
languageOptions: {
globals: {
...globals.node
}
},
rules: {
'@typescript-eslint/no-require-imports': 0,
'@typescript-eslint/no-var-requires': 0
}
},
{
files: [
'**/cypress/*.{js,jsx,mjs,ts,tsx}',
'**/cypress/**/*.{js,jsx,mjs,ts,tsx}'
],
...cypressPlugin.configs.globals,
...cypressPlugin.configs.recommended
},
{
files: [
'**/cypress/plugins/**/*.{js,jsx,mjs,ts,tsx}',
'**/cypress/plugins/*.{js,jsx,mjs,ts,tsx}'
],
languageOptions: {
globals: {
...cypressPlugin.configs.globals.languageOptions.globals,
...globals.node
}
}
},
{
files: ['**/*.specs.{js,jsx,ts,tsx}', '**/test-utils.{js,jsx,ts,tsx}'],
...jestPlugin.configs['flat/recommended'],
...testingLibraryPlugin.configs['flat/react'],
rules: {
'testing-library/prefer-screen-queries': 'warn',
'testing-library/no-node-access': 'warn',
'testing-library/prefer-presence-queries': 'warn',
'testing-library/no-container': 'warn'
}
},
{
files: ['**/*.{js,jsx,mjs}', '*.{js,jsx,mjs}'],
extends: [tseslint.configs.disableTypeChecked, eslint.configs.recommended],
rules: {
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-unsafe-argument': 0,
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/restrict-template-expressions': 0,
'@typescript-eslint/restrict-plus-operands': 0
}
}
);
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"lerna": "2.11.0",
"packages": ["packages/*"],
"version": "21.14.1",
"version": "21.14.2-pre-prod.0",
"command": {
"publish": {
"message": "Build: [skip ci][skip-release] %s"
Expand Down
Loading

0 comments on commit 11e1a96

Please sign in to comment.