Doesn't Flag LookBehind Regexp on Firefox 77
See original GitHub issuehttps://kangax.github.io/compat-table/es2016plus/ shows Firefox 77 isn’t compatible with the regexp lookbehind feature, firefox 78 release notes show it added it in that release (same table shows and confirms the same)
npx browserslist shows firefox 77 is in the defaults, which we use. why wasn’t this caught? we had a look behind that passed the linter, and caused our app to fail on Firefox 77.
eslintrc config:
env:
browser: true
es6: true
extends:
- standard
- plugin:compat/recommended
globals:
Atomics: readonly
SharedArrayBuffer: readonly
parser: babel-eslint
parserOptions:
ecmaFeatures:
jsx: true
experimentalObjectRestSpread: true
ecmaVersion: 2018
sourceType: module
plugins:
- react
- unused-imports
- compat
- es
rules: {
"react/jsx-uses-react" : "error",
# "max-len" : ['error',{ code: 120,ignorePattern: 'import.*| .*:.*' }], #these ignore import statements as well as the agent.js file example where we have a dictionary of constants that can be long.
"react/jsx-uses-vars": "error",
"compat/compat": "error",
"no-console": 1,
"unused-imports/no-unused-imports": 2,
"unused-imports/no-unused-vars": 1,
"lines-between-class-members": 2,
"padding-line-between-statements": ['error',{ blankLine: "always", prev: "function", next: "function" },{ blankLine: "always", prev: "multiline-const", next: "multiline-const" }],
"import/newline-after-import": ["error"]
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Javascript regex (negative) lookbehind not working in firefox
New RegExp engine in SpiderMonkey, adding support for the dotAll flag, Unicode escape sequences, lookbehind references, and named captures.
Read more >Lookbehind in JS regular expressions | Can I use... Support ...
Lookbehind in JS regular expressions ... zero-width assertions in JavaScript regular expressions can be used to ensure a pattern is ... Firefox for...
Read more >1634135 - Enable new regexp engine - Bugzilla@Mozilla
The fix is to pop the saved value before subtracting the length. With this fix, we pass all the test262 tests for look-behind...
Read more >Mimicking Lookbehind in JavaScript - Flagrant Badassery
Unlike lookaheads, JavaScript doesn't support regex lookbehind syntax. ... for RegExp objects, make sure to read about it at the Mozilla ...
Read more >eslint-plugin-compat - Bountysource
Doesn't Flag LookBehind Regexp on Firefox 77 $ 0. Created 2 years ago in amilajack/eslint-plugin-compat with 5 comments. https://kangax.github.io ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Look behinds are unsupported in Safari but this plugin didn’t show the problem. I don’t use Babel, and @babel/eslint-parser doesn’t appear to do browser checking like this plugin does.
It’s fine for this project to set its scope firmly (though I wish that was explained a little more clearly in the readme). Anyone know of any other packages that can test ES syntax features?
That’s what babel and babel-eslint is for.