Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,8 @@ npm-debug.log
## Plugin
/plugin/build

## Turborepo
.turbo

## Build
/build
111 changes: 80 additions & 31 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,49 +1,98 @@
/* eslint-env node */
const path = require('path')
const { defineConfig } = require('eslint/config')

const repoRoot = process.cwd()
const expoConfig = require('eslint-config-expo/flat')
const prettierConfig = require('eslint-config-prettier')
const simpleImportSort = require('eslint-plugin-simple-import-sort')

module.exports = defineConfig([
// Base Expo configuration
expoConfig,

// Prettier config to disable conflicting rules
prettierConfig,

// Ignore build artifacts and generated files
{
ignores: ['build/*', 'plugin/build/*', 'website/doc_build/*'],
ignores: [
'build/',
'plugin/build/',
'node_modules/',
'**/*.d.ts',
'coverage/',
'example/',
'website/',
'generator/',
'**/__tests__/',
],
},
defineConfig([
{
basePath: 'example',
settings: {
'import/resolver': {
alias: {
map: [
['voltra', path.join(repoRoot, 'src')],
['~', path.join(repoRoot, 'example')],
],
extensions: ['.ts', '.tsx', '.js', '.jsx'],
},
},

// Configuration files settings
{
files: ['**/babel.config.js', '**/*.config.js', '**/.eslintrc.js'],
languageOptions: {
globals: {
__dirname: 'readonly',
module: 'readonly',
require: 'readonly',
process: 'readonly',
},
},
{
files: ['**/babel.config.js'],
languageOptions: {
globals: {
__dirname: 'readonly',
},
},

// Test files settings
{
files: ['**/__tests__/**/*', '**/*.test.ts', '**/*.test.tsx'],
languageOptions: {
globals: {
jest: 'readonly',
describe: 'readonly',
test: 'readonly',
it: 'readonly',
expect: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
beforeAll: 'readonly',
afterAll: 'readonly',
},
},
{
plugins: {
'simple-import-sort': simpleImportSort,
},
rules: {
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
},
},

// Import sorting rules
{
plugins: {
'simple-import-sort': simpleImportSort,
},
rules: {
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
},
]),
},

// TypeScript-specific rules
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
// Prefer type imports for better tree-shaking
'@typescript-eslint/consistent-type-imports': [
'warn',
{
prefer: 'type-imports',
fixStyle: 'inline-type-imports',
},
],

// Disable rules that TypeScript handles better
'no-undef': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
},
])
Loading
Loading