Adds a simple ESLint plugin for custom environments. The plugin has a single exported value named `globals`, which is an object with keys for all globally available self-hosted identifiers. All self-hosted values are read-only, so we set all properties of `globals` to `"readonly"`. BytecodeEmitter special identifiers are added to the `.eslintrc.js` file, because that keeps them closer to the SpiderMonkey source tree when compared to "tools/lint/eslint/eslint-plugin-spidermonkey-js". Also see: - tools/lint/eslint/eslint-plugin-mozilla/lib/environments/ - https://eslint.org/docs/latest/user-guide/configuring/language-options Differential Revision: https://phabricator.services.mozilla.com/D153337
21 lines
664 B
JavaScript
21 lines
664 B
JavaScript
/**
|
|
* @fileoverview A processor to help parse the spidermonkey js code.
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
"use strict";
|
|
|
|
// ------------------------------------------------------------------------------
|
|
// Plugin Definition
|
|
// ------------------------------------------------------------------------------
|
|
module.exports = {
|
|
processors: {
|
|
processor: require("../lib/processors/self-hosted"),
|
|
},
|
|
environments: {
|
|
environment: require("../lib/environments/self-hosted"),
|
|
},
|
|
};
|