diff --git a/.circleci/config.yml b/.circleci/config.yml index 5ab7d2afc52..f7b260b35e1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -167,8 +167,11 @@ jobs: echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plotly.min.js echo https://$CIRCLE_BUILD_NUM-$PROJECT_NUM-gh.circle-artifacts.com/0/dist/plot-schema.json - run: - name: Test bundles + name: Test certain bundles against function constructors command: npm run no-new-func + - run: + name: Test plotly bundles againt unexpected characters + command: npm run no-bad-char workflows: version: 2 diff --git a/package.json b/package.json index e3a05368405..63bbe4b860d 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "lint": "eslint --version && eslint .", "lint-fix": "eslint . --fix || true", "no-new-func": "eslint --no-ignore --no-eslintrc --no-inline-config --rule '{no-new-func: error}' $(find dist -type f -iname '*.js' | grep -v plotly-gl* | grep -v plotly-with-meta.* | grep -v plotly.js | grep -v plotly.min.js | grep -v MathJax.js)", + "no-bad-char": "eslint --no-ignore --no-eslintrc --no-inline-config --rule '{no-misleading-character-class: error}' $(find dist -type f -iname '*.js' | grep plotly)", "docker": "node tasks/docker.js", "pretest": "node tasks/pretest.js", "test-jasmine": "karma start test/jasmine/karma.conf.js", @@ -45,7 +46,7 @@ "start": "npm run start-test_dashboard", "baseline": "node tasks/baseline.js", "preversion": "check-node-version --node 12 --npm 6.14 && npm-link-check && npm ls --prod", - "version": "npm run build && git add -A dist src build", + "version": "npm run build && npm run no-bad-char && git add -A dist src build", "postversion": "node -e \"console.log('Version bumped and committed. If ok, run: git push && git push --tags')\"", "postpublish": "node tasks/sync_packages.js", "postshrinkwrap": "chttps ."