Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup code and tests for package lifecycle work #127

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 11 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
module.exports = {

Check warning on line 1 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / os_build (ubuntu-latest, 3.9, 20)

File ignored by default.

Check warning on line 1 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / os_build (ubuntu-latest, 3.8, 20)

File ignored by default.

Check warning on line 1 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / os_build (ubuntu-latest, 3.11, 20)

File ignored by default.

Check warning on line 1 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / os_build (ubuntu-latest, 3.10, 20)

File ignored by default.

Check warning on line 1 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / os_build (macos-latest, 3.8, 20)

File ignored by default.

Check warning on line 1 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / os_build (macos-latest, 3.11, 20)

File ignored by default.

Check warning on line 1 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / os_build (macos-latest, 3.9, 20)

File ignored by default.

Check warning on line 1 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / os_build (macos-latest, 3.10, 20)

File ignored by default.
env: {
jest: true,
node: true,
},
plugins: ['@typescript-eslint', 'prettier', 'import', 'prefer-arrow'],
plugins: [
'@typescript-eslint',
'prettier',
'import',
'prefer-arrow'
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2017,
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.eslint.json',
},
Expand Down Expand Up @@ -34,13 +39,16 @@
'@typescript-eslint/no-empty-function': ['warn'],
'@typescript-eslint/no-explicit-any': ['warn'],

'@typescript-eslint/no-unused-vars': ['warn'],
'@typescript-eslint/no-loss-of-precision': ['warn'],

// Require all imported dependencies are actually declared in package.json
'import/no-extraneous-dependencies': ['error'],
'import/no-unresolved': ['error'],
},
overrides: [
{
files: ['*.js', '*.jsx'],
files: ['*.js', '*.jsx', '*.cjs'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unused-vars': 'off',
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
os_build:
Expand Down
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ repos:
- --fix=lf
- id: trailing-whitespace
- id: pretty-format-json
exclude: ^tsconfig.*.json
args:
- --autofix
- --indent=4
Expand Down Expand Up @@ -56,7 +57,7 @@ repos:
types: []
files: (.*.js$|.*.ts$)
additional_dependencies:
- eslint@6.8.0
- eslint@8.21.0
- repo: local
hooks:
- id: pylint-local
Expand Down
14 changes: 10 additions & 4 deletions jest.config.js → jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
const { ignorePatterns } = require('./.eslintrc');

module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
globals: {
'ts-jest': {
ignoreCoverageForAllDecorators: true,
},
transform: {
'^.+\\.ts?$': [
'ts-jest',
{
ignoreCoverageForAllDecorators: true,
tsconfig: 'tsconfig.test.json',
},
],
},
testRegex: '\\.test.ts$',
testRunner: 'jest-circus/runner',
Expand Down
Loading
Loading