Skip to content

Commit

Permalink
Merge pull request #14 from nodecfdi/dev
Browse files Browse the repository at this point in the history
chore: version bump 1.4.0
  • Loading branch information
luffynando authored Sep 21, 2022
2 parents fe951e2 + 5b0a27c commit a42f3b8
Show file tree
Hide file tree
Showing 18 changed files with 1,586 additions and 1,687 deletions.
12 changes: 6 additions & 6 deletions .babelrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const replacements = {
'__VERSION__': pkgVersion,
'__BUILD_DATE__': buildDate,
'__COMMIT_SHA__': commitSha,
'process.env.NODE_ENV': nodeEnv,
'process.env.NODE_ENV': nodeEnv
};

const plugins = ['dev-expression', ['transform-define', replacements]];
Expand All @@ -33,14 +33,14 @@ const jestConfig = {
'@babel/preset-env',
{
targets: {
node: 'current',
},
},
node: 'current'
}
}
],
'@babel/preset-typescript',
'@babel/preset-typescript'
],
ignore: ['node_modules'],
sourceMaps: 'inline',
sourceMaps: 'inline'
};

module.exports = process.env.NODE_ENV === 'test' ? jestConfig : config;
20 changes: 15 additions & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
*.sh
node_modules
*.md
*.woff
*.ttf
.vscode
.idea
dist
docs
examples
coverage
web_modules
tsconfig.json
/public
/docs
/vendor
.husky
.local
/bin
/coverage
tests/tsconfig.json
/examples
82 changes: 49 additions & 33 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,62 +1,75 @@
module.exports = {
const { defineConfig } = require('eslint-define-config');

module.exports = defineConfig({
root: true,
env: {
// commonjs: true,
es6: true,
node: true,
jest: true,
jest: true
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:promise/recommended',
'plugin:jest/recommended',
'plugin:prettier/recommended',
'prettier'
],
parser: '@typescript-eslint/parser',
parserOptions: {
/* enabling "project" field is a performance hit
https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/TYPED_LINTING.md#performance
*/
sourceType: 'module'
},
plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc', 'prettier'],
globals: {
__DEV__: true,
__VERSION__: true,
__COMMIT_SHA__: true,
__BUILD_DATE__: true,
__BUILD_DATE__: true
},
plugins: ['@typescript-eslint/eslint-plugin', 'eslint-plugin-tsdoc', 'prettier'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:jest/recommended', 'prettier'],
parser: '@typescript-eslint/parser',
reportUnusedDisableDirectives: true,
parserOptions: {
/* enabling "project" field is a performance hit
https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/TYPED_LINTING.md#performance
*/
sourceType: 'module',
},
rules: {
// eslint rules
'indent': 'off',
'tsdoc/syntax': 'warn',
'@typescript-eslint/no-unused-vars': [2, { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'semi': 'error',
'quote-props': ['error', 'consistent'],
'generator-star-spacing': ['error', { before: false, after: true }],
'space-before-function-paren': 'off',
'no-dupe-class-members': 'off',
'no-useless-constructor': 'off',
'@typescript-eslint/no-useless-constructor': 'off',
'prettier/prettier': ['error'],
'lines-between-class-members': ['error', 'always'],
'padding-line-between-statements': ['error', { blankLine: 'always', prev: '*', next: 'return' }],

// promise rules
'promise/catch-or-return': ['error', { terminationMethod: ['catch', 'asCallback', 'finally'] }],

// typescript rules
'@typescript-eslint/no-unused-vars': [2, { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'@typescript-eslint/no-useless-constructor': 'off',
'@typescript-eslint/explicit-function-return-type': [
'error',
{
allowExpressions: true,
allowTypedFunctionExpressions: true,
},
allowTypedFunctionExpressions: true
}
],
'@typescript-eslint/explicit-member-accessibility': [
'error',
{
accessibility: 'explicit',
overrides: {
constructors: 'no-public',
},
},
constructors: 'no-public'
}
}
],
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-expect-error': 'allow-with-description',
},
'ts-expect-error': 'allow-with-description'
}
],
'@typescript-eslint/no-non-null-assertion': [2],
'@typescript-eslint/no-explicit-any': [2, { ignoreRestArgs: true }],
Expand All @@ -65,25 +78,28 @@ module.exports = {
{
multiline: {
delimiter: 'semi',
requireLast: true,
requireLast: true
},
singleline: {
delimiter: 'semi',
requireLast: false,
requireLast: false
},
multilineDetection: 'brackets',
},
multilineDetection: 'brackets'
}
],
'@typescript-eslint/indent': ['error', 4],
'@typescript-eslint/no-empty-interface': 'off',

// tsdoc rules
'tsdoc/syntax': 'warn'
},
overrides: [
{
files: ['*.js', '*.jsx'],
files: ['*.js', '*.jsx', '*.cjs'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-var-requires': 'off',
},
},
],
};
'@typescript-eslint/no-var-requires': 'off'
}
}
]
});
2 changes: 1 addition & 1 deletion .lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
'src/**/*.{js,jsx,ts,tsx,json,css,scss,md}': ['eslint --fix'],
'tests/**/*.{js,jsx,ts,tsx,json}': ['eslint --fix'],
'tests/**/*.{js,jsx,ts,tsx,json}': ['eslint --fix']
};
11 changes: 7 additions & 4 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
module.exports = {
printWidth: 120,
tabWidth: 4,
useTabs: false,
semi: true,
singleQuote: true,
trailingComma: "none",
endOfLine: "lf",
quoteProps: "consistent",
printWidth: 120,
quoteProps: 'consistent',
trailingComma: 'none',
arrowParens: 'always',
endOfLine: 'lf'
};
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @nodecfdi/cfdi-to-pdf ChangeLog

## 1.4.0

### Feature support to Automatic generate TFD source string

- Added support to automatic generate TFD source string
- Update devs dependencies
- Update readme with optional qr, and tfdSourceString

## 1.3.1

### Fix fs resolve
Expand Down
Loading

0 comments on commit a42f3b8

Please sign in to comment.