Skip to content

Commit

Permalink
Sync killer sudoku (#2575)
Browse files Browse the repository at this point in the history
  • Loading branch information
SleeplessByte authored Jan 2, 2025
1 parent 94a7b42 commit 2f50011
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 28 deletions.
14 changes: 0 additions & 14 deletions exercises/practice/killer-sudoku-helper/.eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion exercises/practice/killer-sudoku-helper/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/node_modules
/bin/configlet
/bin/configlet.exe
/pnpm-lock.yaml
/package-lock.json
/yarn.lock
2 changes: 1 addition & 1 deletion exercises/practice/killer-sudoku-helper/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
presets: ['@exercism/babel-preset-javascript'],
presets: [['@exercism/babel-preset-javascript', { corejs: '3.39' }]],
plugins: [],
};
45 changes: 45 additions & 0 deletions exercises/practice/killer-sudoku-helper/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// @ts-check

import config from '@exercism/eslint-config-javascript';
import maintainersConfig from '@exercism/eslint-config-javascript/maintainers.mjs';

import globals from 'globals';

export default [
...config,
...maintainersConfig,
{
files: maintainersConfig[1].files,
rules: {
'jest/expect-expect': ['warn', { assertFunctionNames: ['expect*'] }],
},
},
{
files: ['scripts/**/*.mjs'],
languageOptions: {
globals: {
...globals.node,
},
},
},
// <<inject-rules-here>>
{
ignores: [
// # Protected or generated
'/.appends/**/*',
'/.github/**/*',
'/.vscode/**/*',

// # Binaries
'/bin/*',

// # Configuration
'/config',
'/babel.config.js',

// # Typings
'/exercises/**/global.d.ts',
'/exercises/**/env.d.ts',
],
},
];
22 changes: 22 additions & 0 deletions exercises/practice/killer-sudoku-helper/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
verbose: true,
projects: ['<rootDir>'],
testMatch: [
'**/__tests__/**/*.[jt]s?(x)',
'**/test/**/*.[jt]s?(x)',
'**/?(*.)+(spec|test).[jt]s?(x)',
],
testPathIgnorePatterns: [
'/(?:production_)?node_modules/',
'.d.ts$',
'<rootDir>/test/fixtures',
'<rootDir>/test/helpers',
'__mocks__',
],
transform: {
'^.+\\.[jt]sx?$': 'babel-jest',
},
moduleNameMapper: {
'^(\\.\\/.+)\\.js$': '$1',
},
};
29 changes: 17 additions & 12 deletions exercises/practice/killer-sudoku-helper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,25 @@
"directory": "exercises/practice/killer-sudoku-helper"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@exercism/babel-preset-javascript": "^0.2.1",
"@exercism/eslint-config-javascript": "^0.6.0",
"@types/jest": "^29.5.12",
"@types/node": "^20.12.12",
"babel-jest": "^29.6.4",
"core-js": "~3.37.1",
"eslint": "^8.49.0",
"@exercism/babel-preset-javascript": "^0.5.1",
"@exercism/eslint-config-javascript": "^0.8.1",
"@jest/globals": "^29.7.0",
"@types/node": "^22.10.3",
"@types/shelljs": "^0.8.15",
"babel-jest": "^29.7.0",
"core-js": "~3.39.0",
"diff": "^7.0.0",
"eslint": "^9.17.0",
"expect": "^29.7.0",
"globals": "^15.14.0",
"jest": "^29.7.0"
},
"dependencies": {},
"scripts": {
"test": "jest ./*",
"watch": "jest --watch ./*",
"lint": "eslint ."
}
"lint": "corepack pnpm eslint .",
"test": "corepack pnpm jest",
"watch": "corepack pnpm jest --watch",
"format": "corepack pnpm prettier -w ."
},
"packageManager": "[email protected]"
}

0 comments on commit 2f50011

Please sign in to comment.