Skip to content

Commit

Permalink
feat: support ESLint 9
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

Requires Node 18

Also:
- chore: use flat config
  • Loading branch information
brettz9 committed Jul 16, 2024
1 parent 9d1ac3c commit ad12f8d
Show file tree
Hide file tree
Showing 50 changed files with 2,881 additions and 2,110 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

28 changes: 0 additions & 28 deletions .eslintrc

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/feature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "18"
- run: npm ci
- run: npm ci --legacy-peer-deps
- run: npm run build
- run: npm run lint
- run: npm run test
- run: npm run build
timeout-minutes: 10
name: Test and build
on:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "18"
- run: npm ci
- run: npm ci --legacy-peer-deps
- run: npm run build
- run: npm run lint
- run: npm run test
- run: npm run build
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
50 changes: 50 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// import auto from 'eslint-config-canonical/configurations/auto.js';
import eslintPluginCanonical from './dist/src/index.js';

export default [
{
ignores: [
'package-lock.json',
'**/ExportMap.ts',
'tests/fixtures',

'coverage',
'dist',
'node_modules',
'pnpm-lock.yaml',
'*.log',
'.*',
'!.github',
'!.gitignore',
'!.husky',
'!.releaserc',
],
},
eslintPluginCanonical.configs['flat/recommended'],
// ...auto,
];

/*
'overrides': [
{
'extends': [
'canonical',
'canonical/node',
'canonical/typescript',
'canonical/typescript-disable-type-checking',
'canonical/prettier'
],
'rules': {
'unicorn/expiring-todo-comments': 0,
'@typescript-eslint/no-for-in-array': 0
},
'files': '*.ts'
},
{
'extends': [
'canonical/json'
],
files: ['*.json']
}
]
*/
Loading

0 comments on commit ad12f8d

Please sign in to comment.