Skip to content

Commit

Permalink
Improved rule no-highcharts-object.
Browse files Browse the repository at this point in the history
  • Loading branch information
bre1470 committed Jun 2, 2021
1 parent 13d9bcd commit 3c97a3a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/rules/no-highcharts-object.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
'use strict';

const message = 'Do not use the global Highcharts object to access utility functions.';
const message = 'Do not use the global Highcharts object, import Globals instead.';

//------------------------------------------------------------------------------
// Rule Definition
Expand Down Expand Up @@ -38,7 +38,7 @@ module.exports = {
return;
}

const regex = /Highcharts\.[a-z]/g;
const regex = /Highcharts([,)\]]|\.[a-z]|\.\w+\()/g;

let match;

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
{
"name": "eslint-plugin-highcharts",
"version": "1.0.6",
"version": "1.0.7",
"description": "ESLint rules for the Highcharts project",
"keywords": [
"eslint",
"eslintplugin",
"eslint-plugin"
],
"author": "Torstein",
"author": "Highsoft AS <support@highcharts.com> (http://www.highcharts.com/about)",
"repository": {
"type": "git",
"url": "https://github.com/highcharts/eslint-plugin-highcharts.git"
},
"main": "lib/index.js",
"scripts": {
"test": "mocha tests --recursive"
Expand All @@ -16,8 +20,8 @@
"requireindex": "~1.2.0"
},
"devDependencies": {
"eslint": "^7.23.0",
"mocha": "^8.3.2"
"eslint": "^7.27.0",
"mocha": "^8.4.0"
},
"engines": {
"node": ">=0.10.0"
Expand Down

0 comments on commit 3c97a3a

Please sign in to comment.