Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"@lwc/eslint-plugin-lwc": "^0.6.0",
"babel-eslint": "^10.0.1",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jest": "^22.0.0"
"eslint-plugin-jest": "^22.0.0",
"eslint-restricted-globals": "^0.2.0"
},
"devDependencies": {
"eslint": "^5.9.0",
Expand Down
11 changes: 3 additions & 8 deletions recommended.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

const restrictedGlobals = require('eslint-restricted-globals');

module.exports = {
plugins: ['import', 'jest'],

Expand Down Expand Up @@ -75,14 +77,7 @@ module.exports = {
// Variables
// https://eslint.org/docs/rules/#variables
'no-label-var': 'error',
'no-restricted-globals': [
'error',
{
name: 'event',
message:
'Use local parameter instead of accessing the current event out of the global object.',
},
],
'no-restricted-globals': ['error'].concat(restrictedGlobals),
'no-shadow': 'error',
'no-shadow-restricted-names': 'error',
'no-undef-init': 'error',
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,11 @@ eslint-plugin-jest@^22.0.0:
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.1.0.tgz#9a4dfa3367563e8301560a7fb92ec309096dbca3"
integrity sha512-WcQd5LxEoAS20zuWEAd8CX0pVC+gGInZPcsoYvK5w7BrEJNmltyTxYYh1r0ct4GsahD2GvNySlcTcLtK2amFZA==

eslint-restricted-globals@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/eslint-restricted-globals/-/eslint-restricted-globals-0.2.0.tgz#7729f326af97bec7a7e56d9f7d9c064b79285c50"
integrity sha512-kwYJALm5KS2QW3Mc1PgObO4V+pTR6RQtRT65L1GQILlEnAhabUQqGAX7/qUjoQR4KZJKehWpBtyDEiDecwmY9A==

eslint-scope@3.7.1:
version "3.7.1"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8"
Expand Down