Remove babel-plugin-transform-remove-strict-mode

This commit is contained in:
Tyler Long 2017-09-03 08:26:57 +08:00
parent 8c7e8b7a6c
commit 73eb98c4c3
6 changed files with 3 additions and 17 deletions

View File

@ -32,6 +32,7 @@ module.exports = function (config) {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
@ -41,9 +42,6 @@ module.exports = function (config) {
'browsers': ['last 3 versions']
}
}]
],
plugins: [
'transform-remove-strict-mode'
]
}
}

View File

@ -58,7 +58,6 @@
"async": "^2.5.0",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-plugin-transform-remove-strict-mode": "^0.0.2",
"babel-preset-env": "^1.6.0",
"babel-preset-es2015": "^6.24.1",
"clone": "^2.1.1",

View File

@ -87,16 +87,15 @@ describe('when cloning CSS ', function () {
}
function addMermaidSVGwithStyleToDocument () {
var styleSheetCount = document.styleSheets.length
var svg = document.createElement('svg')
svg.setAttribute('id', 'mermaid-03')
var s = document.createElement('style')
s.setAttribute('type', 'text/css')
s.setAttribute('title', 'mermaid-svg-internal-css')
s.innerHTML = '#mermaid-05 .node2 { stroke:#eee; }\n.node-square { stroke:#bfe; }\n'
s.title = 'mermaid-svg-internal-css'
svg.appendChild(s)
document.body.appendChild(svg)
document.styleSheets[styleSheetCount].title = 'mermaid-svg-internal-css'
}
it('should handle errors thrown when accessing CSS rules', function () {
@ -104,7 +103,7 @@ describe('when cloning CSS ', function () {
svg.setAttribute('id', 'mermaid-01')
// Firefox throws a SecurityError when trying to access cssRules
document.styleSheets[document.styleSheets.length++] = {
document.styleSheets[document.styleSheets.length] = {
get cssRules () { throw new Error('SecurityError') }
}

View File

@ -3,9 +3,6 @@
- Problem is it's for d3 v4 only
- Make node console output colors like Chrome console
- What's the correct way to change logLevel as an end user?
- d3 v3 doesn't support 'use strict'
- babel-plugin-transform-remove-strict-mode
- need to remove it after upgrading to d3 v4
- Fix CodeClimate
- What is live-server ?
- Get familar with jison

View File

@ -36,9 +36,6 @@ export const webConfig = () => {
'browsers': ['last 3 versions']
}
}]
],
plugins: [
'transform-remove-strict-mode'
]
}
}

View File

@ -708,10 +708,6 @@ babel-plugin-transform-regenerator@^6.24.1:
dependencies:
regenerator-transform "^0.10.0"
babel-plugin-transform-remove-strict-mode@^0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-remove-strict-mode/-/babel-plugin-transform-remove-strict-mode-0.0.2.tgz#913685aab95439f3a0ed88e588fbd5e997890579"
babel-plugin-transform-strict-mode@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758"