Skip to content
Merged
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
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

11 changes: 0 additions & 11 deletions .eslintrc.js

This file was deleted.

76 changes: 76 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
const js = require('@eslint/js')
const typescriptEslint = require('@typescript-eslint/eslint-plugin')
const tsParser = require('@typescript-eslint/parser')
const globals = require('globals')
const simpleImportSort = require('eslint-plugin-simple-import-sort')
const prettierRecommended = require('eslint-plugin-prettier/recommended')

module.exports = [
{
ignores: [
'**/node_modules/**',
'lib/**',
'sample/**',
// Codegen spec files have strict type requirements (Object vs object, semicolons)
// dictated by React Native's codegen — do not lint or auto-fix these.
'src/fabric/**',
],
},
js.configs.recommended,
prettierRecommended,
// Prettier formatting is advisory — existing files with different style won't block CI.
{ rules: { 'prettier/prettier': 'warn' } },
// CommonJS config/script files
Comment thread
uc-brunosilva marked this conversation as resolved.
{
files: ['**/*.js', '**/*.jsx'],
languageOptions: {
globals: {
...globals.commonjs,
...globals.node,
},
},
},
// TypeScript source files
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
},
plugins: {
'@typescript-eslint': typescriptEslint,
'simple-import-sort': simpleImportSort,
},
rules: {
...typescriptEslint.configs.recommended.rules,
// Wrapper types (String/Number/Boolean/Object) exist in pre-existing model files;
// downgrade so existing code doesn't block CI.
'@typescript-eslint/no-wrapper-object-types': 'warn',
'import/order': 'off',
Comment thread
uc-brunosilva marked this conversation as resolved.
// Warn rather than error so pre-existing unsorted imports don't block CI.
'simple-import-sort/exports': 'warn',
'simple-import-sort/imports': 'warn',
'sort-imports': 'off',
},
},
// Test files — add jest globals and relax any-type rules used in mocks
{
files: [
'**/__tests__/**/*.ts',
'**/__tests__/**/*.tsx',
'**/*.test.ts',
'**/*.test.tsx',
],
languageOptions: {
globals: {
...globals.jest,
},
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
]
Loading
Loading