Files
react/scripts/rollup/validate/eslintrc.rn.js
Emanuel Tesař b8d079b413 Add trusted types to react on client side (#16157)
* Add trusted types to react on client side

* Implement changes according to review

* Remove support for trusted URLs, change TrustedTypes to trustedTypes

* Add support for deprecated trusted URLs

* Apply PR suggesstions

* Warn only once, remove forgotten check, put it behind a flag

* Move comment

* Fix PR comments

* Fix html toString concatenation

* Fix forgotten else branch

* Fix PR comments
2019-09-16 13:43:22 +01:00

46 lines
1.0 KiB
JavaScript

'use strict';
module.exports = {
env: {
commonjs: true,
browser: true,
},
globals: {
// ES6
Map: true,
Set: true,
Symbol: true,
Proxy: true,
WeakMap: true,
WeakSet: true,
// Vendor specific
MSApp: true,
__REACT_DEVTOOLS_GLOBAL_HOOK__: true,
// FB
__DEV__: true,
// Fabric. See https://github.com/facebook/react/pull/15490
// for more information
nativeFabricUIManager: true,
// Trusted Types
trustedTypes: true,
// Scheduler profiling
SharedArrayBuffer: true,
Int32Array: true,
ArrayBuffer: true,
},
parserOptions: {
ecmaVersion: 5,
sourceType: 'script',
},
rules: {
'no-undef': 'error',
'no-shadow-restricted-names': 'error',
},
// These plugins aren't used, but eslint complains if an eslint-ignore comment
// references unused plugins. An alternate approach could be to strip
// eslint-ignore comments as part of the build.
plugins: ['jest', 'no-for-of-loops', 'react', 'react-internal'],
};