mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-10 05:28:41 +00:00
Lint against function polyfills that may be expensive (#1597)
* Lint against polyfills that may be expensive * Exclude test file from source code linting
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
"parser": "babel-eslint",
|
"parser": "babel-eslint",
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"flowtype"
|
"flowtype",
|
||||||
|
"transform-runtime-aliasing"
|
||||||
],
|
],
|
||||||
"extends": [
|
"extends": [
|
||||||
"eslint:recommended",
|
"eslint:recommended",
|
||||||
@@ -72,9 +73,10 @@
|
|||||||
},
|
},
|
||||||
"overrides": [{
|
"overrides": [{
|
||||||
"files": ["katex.js", "src/**/*.js", "contrib/**/*.js"],
|
"files": ["katex.js", "src/**/*.js", "contrib/**/*.js"],
|
||||||
"excludedFiles": "unicodeMake.js",
|
"excludedFiles": ["*-spec.js", "unicodeMake.js"],
|
||||||
"rules": {
|
"rules": {
|
||||||
"no-restricted-syntax": [2, "ForOfStatement", "ClassDeclaration[superClass]", "ClassExpression[superClass]"]
|
"no-restricted-syntax": [2, "ForOfStatement", "ClassDeclaration[superClass]", "ClassExpression[superClass]"],
|
||||||
|
"transform-runtime-aliasing/no-transform-runtime-aliasing": 2
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
"env": {
|
"env": {
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
"eslint": "^5.0.0",
|
"eslint": "^5.0.0",
|
||||||
"eslint-plugin-flowtype": "^2.40.1",
|
"eslint-plugin-flowtype": "^2.40.1",
|
||||||
"eslint-plugin-react": "^7.10.0",
|
"eslint-plugin-react": "^7.10.0",
|
||||||
|
"eslint-plugin-transform-runtime-aliasing": "^0.1.1",
|
||||||
"file-loader": "^1.1.11",
|
"file-loader": "^1.1.11",
|
||||||
"flow-bin": "^0.78.0",
|
"flow-bin": "^0.78.0",
|
||||||
"husky": "^1.0.0-rc.8",
|
"husky": "^1.0.0-rc.8",
|
||||||
|
@@ -2407,6 +2407,10 @@ eslint-plugin-react@^7.10.0:
|
|||||||
jsx-ast-utils "^2.0.1"
|
jsx-ast-utils "^2.0.1"
|
||||||
prop-types "^15.6.2"
|
prop-types "^15.6.2"
|
||||||
|
|
||||||
|
eslint-plugin-transform-runtime-aliasing@^0.1.1:
|
||||||
|
version "0.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/eslint-plugin-transform-runtime-aliasing/-/eslint-plugin-transform-runtime-aliasing-0.1.1.tgz#1f496a2e4a0ebf7cad8486ae70c034bda06ac0f3"
|
||||||
|
|
||||||
eslint-scope@3.7.1:
|
eslint-scope@3.7.1:
|
||||||
version "3.7.1"
|
version "3.7.1"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8"
|
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8"
|
||||||
|
Reference in New Issue
Block a user