Skip to content

Commit

Permalink
⬆️ Upgrade dependencies and init cspell
Browse files Browse the repository at this point in the history
  • Loading branch information
KirianCaumes committed Aug 1, 2023
1 parent 04afde4 commit 748f604
Show file tree
Hide file tree
Showing 19 changed files with 2,257 additions and 731 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"davidanson.vscode-markdownlint",
"dbaeumer.vscode-eslint",
"pflannery.vscode-versionlens",
"esbenp.prettier-vscode"
"esbenp.prettier-vscode",
"streetsidesoftware.code-spell-checker"
]
}
}
Expand Down
23 changes: 18 additions & 5 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ module.exports = {
],
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
},
plugins: ['jsdoc'],
reportUnusedDisableDirectives: true,
rules: {
'@typescript-eslint/consistent-type-definitions': ['warn', 'type'],
'@typescript-eslint/naming-convention': [
Expand All @@ -38,7 +38,7 @@ module.exports = {
{ selector: 'typeAlias', format: ['PascalCase'], suffix: ['Type', 'State', 'Props', 'Returns', 'Params'] },
],
'@typescript-eslint/explicit-function-return-type': ['warn', { allowExpressions: true }],
'@typescript-eslint/consistent-type-imports': ['error', { disallowTypeAnnotations: false }],
'@typescript-eslint/consistent-type-imports': ['error'],
'jsdoc/require-jsdoc': [
'warn',
{
Expand Down Expand Up @@ -67,10 +67,17 @@ module.exports = {
],
'jsdoc/require-param-description': ['warn', { contexts: ['any'] }],
'jsdoc/require-param': ['warn', { checkDestructuredRoots: false }],
// 'capitalized-comments': ['warn', 'always'], // Not always usefull as it also fix comment with code
camelcase: ['error', { allow: ['format_desc', 'ships_from'] }],
'import/order': ['error', { groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'] }],
'capitalized-comments': [
'warn',
'always',
{
ignorePattern: 'cspell',
},
],
camelcase: ['error'],
'no-restricted-syntax': [
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires, import/no-extraneous-dependencies
// eslint-disable-next-line import/no-extraneous-dependencies, global-require, @typescript-eslint/no-var-requires
...require('eslint-config-airbnb-base/rules/style').rules['no-restricted-syntax'],
{
selector: 'TSEnumDeclaration',
Expand Down Expand Up @@ -100,4 +107,10 @@ module.exports = {
},
},
],
/** {@link https://github.com/import-js/eslint-plugin-import/issues/1485} */
settings: {
'import/resolver': {
typescript: {},
},
},
}
4 changes: 2 additions & 2 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
* @type {import('lint-staged').Config}
*/
module.exports = {
'*.{ts,tsx,js,jsx}': ['prettier --ignore-unknown', 'eslint'],
'*.{html,json,svg,yml,xml}': ['prettier --ignore-unknown'],
'*.{ts,tsx,js,jsx}': ['prettier --ignore-unknown', 'eslint', 'cspell --no-progress'],
'*.{html,json,svg,yml,xml}': ['prettier --ignore-unknown', 'cspell --no-progress'],
}
4 changes: 2 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ type OutputErrorType = {
There is a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers) on that project already configured, feel free to use it.
Install dependecies with:
Install dependencies with:
```sh
npm install
Expand All @@ -294,7 +294,7 @@ You can open a pull request with your new additions.
### Linkedom
If you are using this librairy on a Typescript project, you might encounter issues with `linkedom`.
If you are using this library on a Typescript project, you might encounter issues with `linkedom`.
To fix it, use this in command line: `--skipLibCheck` or add that in you `tsconfig.json`:
Expand Down
11 changes: 11 additions & 0 deletions cspell.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* {@link https://cspell.org/configuration/document-settings/} Documentation
* @type {import('cspell').Settings}
*/
module.exports = {
version: '0.2',
language: 'en',
ignorePaths: ['settings.json', 'devcontainer.json', 'node_modules/**', 'build/**', 'dist/**'],
ignoreWords: ['Kirian_', 'KirianCaumes'],
words: ['discogs', 'wantlist', 'catnos', 'devcontainer', 'linkedom', 'gitmojis', 'mywants', 'camelcase'],
}
1 change: 1 addition & 0 deletions notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Go to <https://www.discogs.com/release/edit/9999999> and run:

```js
const data = []
// cspell: disable-next-line
// Execute the following format and execute following script: Select Vinyl Format, Pathé Disc, Edison Disc, Cylinder, CD, CDV, DVD, HD DVD, Blu-Ray, Ultra HD Blu-Ray, SACD, 4-Track Cartridge, Cassette, DC-International, Reel-to-reel, Sabamobil, Betacam, Film Reel, HitClips, Laserdisc, SelectaVision
document.querySelectorAll('.format_descriptions label span').forEach(x => data.push(x.textContent))
// Then
Expand Down
Loading

0 comments on commit 748f604

Please sign in to comment.