Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

13 changes: 0 additions & 13 deletions .eslintrc.cjs

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
chromatic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- uses: chromaui/action@1cfa065cbdab28f6ca3afaeb3d761383076a35aa # v11.29.0
- run: npm ci --ignore-scripts
- uses: chromaui/action@25d2d37fcbe164dfbf5479a432fbd73d03bae733 # v18.15.2
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
buildScriptName: build:storybook
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,32 @@ jobs:
build:
strategy:
matrix:
version: [20, 22, 24]
version: [22, 24, 26]
name: 🏗️ Build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ matrix.version }}
cache: npm
- run: npm ci
- run: npm ci --ignore-scripts
- run: npm run build
test:
strategy:
matrix:
version: [20, 22, 24]
version: [22, 24, 26]
name: 🧪 A11y tests
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ matrix.version }}
cache: npm
- run: npm ci
- run: npm ci --ignore-scripts
- run: npm run build:storybook
- run: npx playwright install --with-deps
- run: npm run test:storybook
Expand All @@ -46,13 +46,13 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- uses: oxsecurity/megalinter/flavors/javascript@bacb5f8674e3730b904ca4d20c8bd477bc51b1a7 # v7.13.0
- run: npm ci --ignore-scripts
- uses: oxsecurity/megalinter/flavors/javascript@f2fe8c1cba37091848df3e524066c8c23ef353ed # v10.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: false
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .nvmrc
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm ci --ignore-scripts
- run: npm audit signatures
- run: npm run build
- env:
Expand Down
10 changes: 3 additions & 7 deletions .megalinter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ DISABLE:
- SPELL

DISABLE_LINTERS:
# We use stylelint for CSS and SCSS linting
- CSS_SCSS_LINT
# Disable in favour of eslint
- JAVASCRIPT_STANDARD
# We use dependabot for vulnerability monitoring and patching
Expand All @@ -21,8 +19,6 @@ DISABLE_LINTERS:
- REPOSITORY_TRIVY
# Disable in favour of eslint
- TYPESCRIPT_STANDARD
# Link check flags localhost links in the contributing docs
- MARKDOWN_MARKDOWN_LINK_CHECK
# V8R keeps giving false positives
- YAML_V8R
# HTMLHint doesn't like Storybook partials
Expand All @@ -34,12 +30,12 @@ FILEIO_REPORTER: false

# Config paths
CSS_STYLELINT_CONFIG_FILE: .stylelintrc.js
JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.js
TYPESCRIPT_ES_CONFIG_FILE: .eslintrc.js
JAVASCRIPT_ES_CONFIG_FILE: eslint.config.js
TYPESCRIPT_ES_CONFIG_FILE: eslint.config.js

# Executable overrides
CSS_STYLELINT_CLI_EXECUTABLE: ['./node_modules/.bin/stylelint']

# Linters configuration
REPOSITORY_GITLEAKS_DISABLE_ERRORS: true
REPOSITORY_BETTERLEAKS_DISABLE_ERRORS: true
REPOSITORY_TRUFFLEHOG_ARGUMENTS: --exclude_paths .trufflehog-ignore
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22
26
38 changes: 38 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import etchConfig from '@etchteam/eslint-config';
import globals from 'globals';

export default [
{
// ESLint 8 ignored dotfiles by default. ESLint 9 does not.
ignores: ['**/.*', 'src/index.tsx', 'dist', 'storybook-static'],
},
...etchConfig,
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
rules: {
'@typescript-eslint/no-empty-object-type': [
'error',
{
allowInterfaces: 'always',
},
],
'@typescript-eslint/no-namespace': [
'error',
{
allowDeclarations: true,
},
],
'no-irregular-whitespace': [
'error',
{
skipJSXText: true,
},
],
},
},
];
Loading
Loading