UNPKG

eslint-plugin-o1js

Version:

o1js rules for ESLint

28 lines 941 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.configs = exports.rules = void 0; const o1jsRules = [ 'no-greater-storage-limit-in-circuit', 'no-if-in-circuit', 'no-ternary-in-circuit', 'no-throw-in-circuit', 'no-json-functions-in-circuit', 'no-random-in-circuit', 'no-constructor-in-smart-contract', ]; // eslint-disable-next-line @typescript-eslint/no-explicit-any const o1jsRuleModules = {}; exports.rules = o1jsRuleModules; const configs = { recommended: { plugins: ['o1js'], rules: {} }, }; exports.configs = configs; o1jsRules.forEach((rule) => { o1jsRuleModules[rule] = require(`./rules/${rule}`); const { meta: { docs: { recommended }, }, } = o1jsRuleModules[rule]; if (configs.recommended.rules) { configs.recommended.rules[`o1js/${rule}`] = recommended === false ? 'off' : recommended; } }); //# sourceMappingURL=index.js.map