frontend client for gemstone. decentralised workplace app
at main 1.6 kB view raw
1// https://docs.expo.dev/guides/using-eslint/ 2const expoConfig = require("eslint-config-expo/flat"); 3const js = require("@eslint/js"); 4const globals = require("globals"); 5const tseslint = require("typescript-eslint"); 6const { defineConfig, globalIgnores } = require("eslint/config"); 7 8const restrictedImportPaths = [ 9 { 10 name: "react-native", 11 importNames: ["Text"], 12 message: 13 "Don't use base React Native's Text component. Instead, use the Text component exported by @/components/primitives/Text", 14 },{ 15 name: "react-native", 16 importNames: ["Stack"], 17 message: 18 "Don't use base React Native's Stack component. Instead, use the Stack component exported by @/components/primitives/Stack", 19 }, 20]; 21 22module.exports = defineConfig([ 23 globalIgnores(["*.config.*", "dist/*"]), 24 expoConfig, 25 { 26 files: ["**/*.{js,mjs,cjs,ts,mts,cts}"], 27 plugins: { js }, 28 extends: ["js/recommended"], 29 languageOptions: { 30 globals: globals.browser, 31 }, 32 }, 33 tseslint.configs.strictTypeChecked, 34 tseslint.configs.stylisticTypeChecked, 35 { 36 rules: { 37 "@typescript-eslint/consistent-type-imports": "error", 38 "@typescript-eslint/array-type": ["error", { default: "generic" }], 39 "no-restricted-imports": [ 40 "error", 41 { 42 paths: restrictedImportPaths, 43 }, 44 ], 45 }, 46 languageOptions: { 47 parserOptions: { projectService: true, tsconfigRootDir: __dirname }, 48 }, 49 }, 50]);