Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"ejs": "^3.1.6",
"enquirer": "^2.3.6",
"esbuild": "~0.25.0",
"eslint": "^9.11.1",
"eslint": "^9.26.0",
"eslint-config-skuba": "workspace:*",
"execa": "^5.0.0",
"fast-glob": "^3.3.2",
Expand Down
37 changes: 21 additions & 16 deletions packages/eslint-config-skuba/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const { defineConfig, globalIgnores } = require('eslint/config');
const base = require('eslint-config-seek/base');
const extensions = require('eslint-config-seek/extensions');
const eslintPluginYml = require('eslint-plugin-yml');
const tseslint = require('typescript-eslint');

const { js: jsExtensions, ts: tsExtensions } = extensions;

module.exports = [
{
name: 'skuba/ignores',
ignores: [
module.exports = defineConfig([
globalIgnores(
[
// Gantry resource files support non-standard syntax (Go templating)
'**/.gantry/**/*.yaml',
'**/.gantry/**/*.yml',
Expand All @@ -26,8 +26,13 @@ module.exports = [
'lib*/',
'tmp*/',
],
'skuba/ignores',
),
{
name: 'skuba/base',

extends: [base],
},
...base,
{
name: 'skuba/javascript',
rules: {
Expand Down Expand Up @@ -89,17 +94,14 @@ module.exports = [
],
},
},
...[
...tseslint.configs.recommendedTypeChecked,
...tseslint.configs.stylisticTypeChecked,
].map(({ plugins, ...config }) => ({
...config,
files: [`**/*.{${tsExtensions}}`],
})),
{
name: 'skuba/typescript',
files: [`**/*.{${tsExtensions}}`],

extends: [
tseslint.configs.recommendedTypeChecked,
tseslint.configs.stylisticTypeChecked,
],
rules: {
'@typescript-eslint/consistent-type-exports': 'error',
'@typescript-eslint/no-floating-promises': 'error',
Expand All @@ -121,6 +123,7 @@ module.exports = [
},
},
{
name: 'skuba/javascript-overrides',
files: [`**/*.{${jsExtensions}}`],

rules: {
Expand Down Expand Up @@ -172,8 +175,10 @@ module.exports = [
],
},
},
...eslintPluginYml.configs['flat/prettier'].map((config) => ({
...config,
{
name: 'skuba/yaml',
files: ['**/*.{yaml,yml}'],
})),
];

extends: [eslintPluginYml.configs['flat/prettier']],
},
]);
6 changes: 3 additions & 3 deletions packages/eslint-config-skuba/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
},
"dependencies": {
"eslint-config-seek": "14.4.0",
"eslint-plugin-yml": "^1.14.0",
"typescript-eslint": "^8.26.0"
"eslint-plugin-yml": "^1.18.0",
"typescript-eslint": "^8.32.0"
},
"devDependencies": {
"eslint": "^9.11.1",
"eslint": "^9.26.0",
"typescript": "~5.8.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion template/base/_eslint.config.js
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
module.exports = require('eslint-config-skuba');
const { defineConfig } = require('eslint/config');
const skubaConfigs = require('eslint-config-skuba');

module.exports = defineConfig([
{
extends: skubaConfigs,
},
]);
Loading