Skip to content

Commit

Permalink
chore: update dependencies (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
ripecosta authored Nov 25, 2024
1 parent 3c621e7 commit ac35728
Show file tree
Hide file tree
Showing 6 changed files with 742 additions and 986 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,24 @@ jobs:
runs-on: ubuntu-latest
if: github.event.inputs.name || (github.event.pull_request.merged && !contains(github.event.pull_request.labels.*.name, 'no publish'))
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4.2.2
with:
ref: refs/heads/main
persist-credentials: false

- name: Install Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4.1.0
with:
node-version: 16
- run: npm ci --ignore-scripts
node-version: 20

- name: 'Install dependencies'
run: npm ci --ignore-scripts

- name: version_and_publish
env:
CI: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.LH_GITHUB_ADMIN_TOKEN }}
run: |
git config user.name $GITHUB_ACTOR
git config user.email gh-actions-${GITHUB_ACTOR}@github.com
Expand All @@ -33,7 +41,3 @@ jobs:
npm version major
npm publish
git push gh-origin HEAD:main --follow-tags
env:
CI: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.LH_GITHUB_ADMIN_TOKEN }}
99 changes: 37 additions & 62 deletions base.js
Original file line number Diff line number Diff line change
@@ -1,105 +1,80 @@
module.exports = {
plugins: [
'import'
],
plugins: ['import'],

rules: {
// -- Generic rules
'import/no-extraneous-dependencies': ['error', {
devDependencies: true
}],
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'import/no-unresolved': 'off',
'newline-before-return': 'error',
'no-console': ['warn'],
'no-restricted-syntax': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'off',
'no-return-assign': ['error', 'except-parens'],
'no-plusplus': ['error', { 'allowForLoopAfterthoughts': true }],
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'@typescript-eslint/return-await': 'off',

// -- No default exports
'import/no-default-export': 'error',
'import/prefer-default-export': 'off',

// -- Code formatting
'indent': 'off',
'@typescript-eslint/indent': ['error', 2, {
'SwitchCase': 1,
'ignoredNodes': [
'FunctionExpression > .params[decorators.length > 0]',
'FunctionExpression > .params > :matches(Decorator, :not(:first-child))',
'ClassBody.body > PropertyDefinition[decorators.length > 0] > .key',
],
}],
'@typescript-eslint/type-annotation-spacing': ['error', {
before: false,
after: true,
overrides: {
arrow: {
before: true,
after: true,
},
indent: 'off',
'@typescript-eslint/indent': [
'error',
2,
{
SwitchCase: 1,
ignoredNodes: [
'FunctionExpression > .params[decorators.length > 0]',
'FunctionExpression > .params > :matches(Decorator, :not(:first-child))',
'ClassBody.body > PropertyDefinition[decorators.length > 0] > .key',
],
},
}],
],
'@typescript-eslint/type-annotation-spacing': [
'error',
{ before: false, after: true, overrides: { arrow: { before: true, after: true } } },
],
'@typescript-eslint/member-delimiter-style': 'error',
'array-bracket-spacing': ['error', 'always'],
'comma-dangle': ['error', 'always-multiline'],
'@typescript-eslint/comma-dangle': ['error', 'always-multiline'],
'max-len': ['error', {
code: 100,
ignoreComments: true,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true
}],
'no-multiple-empty-lines': ['error', {
max: 1,
maxEOF: 1,
maxBOF: 0,
}],
'@typescript-eslint/brace-style': [
'max-len': [
'error',
'1tbs',
{
'allowSingleLine': false
}
code: 100,
ignoreComments: true,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
},
],
'curly': ['error', 'all'],
'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 1, maxBOF: 0 }],
'@typescript-eslint/brace-style': ['error', '1tbs', { allowSingleLine: false }],
curly: ['error', 'all'],
'key-spacing': 'error',

// -- Typescript
'@typescript-eslint/ban-types': [
'error',
{
types: {
'String': {
'message': 'Use string instead',
'fixWith': 'string'
},
'Number': {
'message': 'Use number instead',
'fixWith': 'number'
},
'Boolean': {
'message': 'Use boolean instead',
'fixWith': 'boolean'
},
}
}
String: { message: 'Use string instead', fixWith: 'string' },
Number: { message: 'Use number instead', fixWith: 'number' },
Boolean: { message: 'Use boolean instead', fixWith: 'boolean' },
},
},
],
'@typescript-eslint/no-namespace': 'error',
},

overrides: [
{
files: ['src/**/*.spec.ts', 'src/**/*.spec.tsx'],
rules: {
'max-len': 'off',
},
files: [
'src/**/*.spec.ts',
'src/**/*.spec.tsx',
],
},
]
}
],
};
Loading

0 comments on commit ac35728

Please sign in to comment.