UNPKG

@risemaxi/syntactio

Version:

Linting and formatting config for Rise client apps. Supports ESLint, Oxlint, and Oxfmt.

50 lines (49 loc) 2.29 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.nativeConfig = void 0; const oxlint_1 = require("oxlint"); const oxlint_react_config_js_1 = require("./oxlint.react.config.js"); /** * React Native rules. Extends react. * Includes compat plugin for rules that crash in the original plugin. */ exports.nativeConfig = (0, oxlint_1.defineConfig)({ extends: [oxlint_react_config_js_1.reactConfig], jsPlugins: [ "@risemaxi/syntactio/react-native-compat", "eslint-plugin-react-native", "eslint-plugin-react-native-a11y", ], globals: { cancelAnimationFrame: "readonly", cancelIdleCallback: "readonly", clearImmediate: "readonly", ErrorUtils: "readonly", requestAnimationFrame: "readonly", requestIdleCallback: "readonly", setImmediate: "readonly", }, rules: { "react-native-compat/no-unused-styles": "warn", "react-native-compat/no-inline-styles": "warn", "react-native-compat/no-color-literals": "warn", "react-native/no-raw-text": ["error", { skip: ["AnimatedText"] }], "react-native/sort-styles": "warn", "react-native/no-single-element-style-arrays": "warn", "react-native/split-platform-components": "warn", "react-native-a11y/has-accessibility-hint": "error", "react-native-a11y/has-accessibility-props": "error", "react-native-a11y/has-valid-accessibility-actions": "error", "react-native-a11y/has-valid-accessibility-component-type": "error", "react-native-a11y/has-valid-accessibility-descriptors": "error", "react-native-a11y/has-valid-accessibility-role": "error", "react-native-a11y/has-valid-accessibility-state": "error", "react-native-a11y/has-valid-accessibility-states": "error", "react-native-a11y/has-valid-accessibility-traits": "error", "react-native-a11y/has-valid-accessibility-value": "error", "react-native-a11y/no-nested-touchables": "error", "react-native-a11y/has-valid-accessibility-ignores-invert-colors": "error", "react-native-a11y/has-valid-accessibility-live-region": "error", "react-native-a11y/has-valid-important-for-accessibility": "error", }, });