Skip to content

Commit

Permalink
chore: update dependencies and configuration
Browse files Browse the repository at this point in the history
- Updated Pillarbox from 1.12.2 to 1.14.1
- Updated ESLint from v8 to v9 and migrated configuration file to new format
- Updated development dependencies for the demo and the samples
- Adjusted configuration files accordingly
  • Loading branch information
jboix committed Oct 24, 2024
1 parent 4e7b842 commit 4354c83
Show file tree
Hide file tree
Showing 20 changed files with 5,801 additions and 6,406 deletions.
105 changes: 0 additions & 105 deletions .eslintrc.json

This file was deleted.

3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit ${1}
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run eslint && npm run stylelint
75 changes: 75 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import globals from 'globals';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [...compat.extends('eslint:recommended'), {
languageOptions: {
globals: {
...globals.browser,
},

ecmaVersion: 'latest',
sourceType: 'module',
},

rules: {
complexity: ['error', {
max: 5,
}],

'function-paren-newline': ['error', 'multiline-arguments'],
'linebreak-style': ['error', 'unix'],
'max-depth': ['error', 2],

'max-len': ['error', {
code: 80,
ignoreComments: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreTrailingComments: true,
ignoreUrls: true,
}],

'max-lines-per-function': ['error', {
max: 35,
skipComments: true,
}],

'max-nested-callbacks': ['error', 3],
'max-statements': ['error', 10],
'newline-after-var': ['error', 'always'],

'no-bitwise': ['error', {
int32Hint: true,
}],

'no-cond-assign': ['error', 'always'],

'no-console': ['error', {
allow: ['warn', 'error'],
}],

'no-plusplus': ['error', {
allowForLoopAfterthoughts: true,
}],

'padding-line-between-statements': ['error', {
blankLine: 'always',
prev: '*',
next: 'return',
}],

semi: ['error', 'always'],
'space-before-function-paren': ['error', 'never'],
},
}];
Loading

0 comments on commit 4354c83

Please sign in to comment.