Skip to content

Commit

Permalink
Bump ESLint, TypeScript, and Prettier to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
mhoran committed Nov 12, 2024
1 parent 855d179 commit 28b39cd
Show file tree
Hide file tree
Showing 10 changed files with 536 additions and 449 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

27 changes: 0 additions & 27 deletions .eslintrc

This file was deleted.

3 changes: 2 additions & 1 deletion __mocks__/react-native-reanimated.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
module.exports = require('react-native-reanimated/mock');
export * from 'react-native-reanimated/mock';
export { default } from 'react-native-reanimated/mock';
50 changes: 50 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { fixupPluginRules } from '@eslint/compat';
import eslint from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import reactPlugin from 'eslint-plugin-react';
import hooksPlugin from 'eslint-plugin-react-hooks';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default tseslint.config(
{
ignores: ['src/lib/weechat/parser.js', '.expo/**/*']
},
eslint.configs.recommended,
tseslint.configs.eslintRecommended,
...tseslint.configs.recommended,
reactPlugin.configs.flat.recommended,
reactPlugin.configs.flat['jsx-runtime'],
eslintConfigPrettier,
{
plugins: {
'react-hooks': fixupPluginRules(hooksPlugin)
},
languageOptions: {
globals: {
...globals.jest,
...globals.node
},
parser: tseslint.parser,
parserOptions: {
project: true
}
},
settings: { react: { version: 'detect' } },
rules: {
...hooksPlugin.configs.recommended.rules,

eqeqeq: 'error',
'no-param-reassign': ['error', { props: true }],

'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{ ignoreRestSiblings: true }
],

'react/no-access-state-in-setstate': 'error',
'react/prop-types': 'off'
}
}
);
Loading

0 comments on commit 28b39cd

Please sign in to comment.