Skip to content
Permalink
Browse files

fix: Always collect export in declare module/names blocks

BREAKING CHANGE: Declared items in declare module x construction considered always as exported
  • Loading branch information...
roman.vasilev
roman.vasilev committed Feb 12, 2019
1 parent b187934 commit 0b8f3079e6e3d422099433c528937167b37a8614
Showing with 214 additions and 10,683 deletions.
  1. +32 −47 .eslintrc.js
  2. +15 −4 .npmignore
  3. +1 −0 .npmrc
  4. +15 −0 .releaserc.json
  5. +48 −0 Taskfile
  6. +0 −10,548 package-lock.json
  7. +26 −45 package.json
  8. +1 −23 src/commonjs.spec.ts
  9. +11 −1 src/parse.spec.ts
  10. +18 −15 src/parse.ts
  11. +47 −0 tslint.json
@@ -1,55 +1,40 @@
const tslintRulesRecommended = require('tslint/lib/configs/recommended').rules;
const tslintRules = Object.assign({}, tslintRulesRecommended, {
"member-access": false,
"ordered-imports": false,
"quotemark": false,
"no-var-keyword": false,
"object-literal-sort-keys": false,
"no-console": false,
"arrow-parens": false,
"max-line-length": false,
"object-literal-key-quotes": false,
"no-shadowed-variable": false,
"only-arrow-functions": false,
"no-var-requires": false,
"interface-over-type-literal": false,
"align": false,
});

module.exports = {
"env": {
"es6": true,
"node": true
'root': true,
'env': {
'node': true
},
"extends": [
"eslint:recommended",
"plugin:unicorn/recommended",
'extends': [
'eslint:recommended',
'plugin:unicorn/recommended',
],
"parser": "typescript-eslint-parser",
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
'parser': '@typescript-eslint/parser',
'parserOptions': {
'ecmaVersion': 2017,
'sourceType': 'module',
'ecmaFeatures': {
'jsx': false,
},
'project': 'tsconfig.json',
},
"plugins": [
"unicorn",
"typescript",
"import",
"tslint",
'plugins': [
'unicorn',
'import',
'@typescript-eslint/tslint',
],
"rules": {
"no-undef": 0,
"no-unused-vars": 0,
"indent": 0,
"unicorn/import-index": 0,
"unicorn/catch-error-name": 0,
"tslint/config": [1, {
rules: tslintRules,
rulesDirectory: ["node_modules/tslint/lib/rules"],
'rules': {
'no-undef': 0,
'no-unused-vars': 0,
'indent': 0,
'no-dupe-class-members': 0,
'unicorn/import-index': 0,
'unicorn/catch-error-name': 0,
'import/newline-after-import': 0,
'import/no-duplicates': 1,
'import/max-dependencies': [1, { 'max': 10 }],
'quotes': [1, 'single', { 'allowTemplateLiterals': true }],
'semi': [1, 'always'],
'@typescript-eslint/tslint/config': [1, {
lintFile: './tslint.json',
}],
"import/newline-after-import": 0,
"import/no-duplicates": 1,
"import/max-dependencies": [1, { "max": 10 }],
"quotes": [1, "single", { "allowTemplateLiterals": true }],
"semi": [1, "always"],
}
};
@@ -1,8 +1,19 @@
~*
# .gitignore
/node_modules
/.idea
/.awcache
/.vscode
/.nyc_output
*.log
/.vscode/
~*
# .npmignore
/tsconfig.json
/fixtures/
/.eslintrc.js
/.editorconfig
/benchmarks
/.gitlab-ci.yml
/gulpfile.ts
/jest.config.js
/.releaserc.json
/.nycrc.json
/tslint.json
/ng-package.json
1 .npmrc
@@ -0,0 +1 @@
package-lock = false
@@ -0,0 +1,15 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
[
"@semantic-release/npm",
{
"pkgRoot": "dist"
}
],
"@semantic-release/github",
"@semantic-release/git"
]
}
@@ -0,0 +1,48 @@
#!/bin/bash
PATH="$PWD/node_modules/.bin":$PATH

remark_run() {
remark readme.md --use toc --use license "$@"
}

remark_output() {
remark_run --output
}

build() {
rm -rf dist
cp -rf src dist && /usr/bin/find dist -name '*.spec.ts' | xargs rm -f
cd dist
tsc index.ts --target es2015 --module commonjs --sourceMap true --skipLibCheck true --declaration true
cd ..
cp README.md LICENSE package.json dist
}

eslint_run() {
eslint src --ext ts
}

eslint_watch() {
eslint_run
inotifywait_cmd=`watch_cmd`
while true; do
$inotifywait_cmd -r src && \
eslint_run
done
}

watch_cmd() {
case `uname -o` in
Linux)
echo 'inotifywait'
;;
Msys)
echo 'inotifywait-win32.cmd'
;;
*)
echo 'inotifywait'
;;
esac
}

"$@"
Oops, something went wrong.

0 comments on commit 0b8f307

Please sign in to comment.
You can’t perform that action at this time.