Skip to content

Commit

Permalink
feat: Add new rules to the config
Browse files Browse the repository at this point in the history
Adding them as warning for now as error is breaking even the
monorepo without easy resolution
  • Loading branch information
acezard committed Mar 2, 2023
1 parent a556dcb commit 84c3157
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions packages/eslint-config-cozy-app/basics.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
'plugin:promise/recommended'
],
parser: '@babel/eslint-parser',
plugins: ['prettier', 'promise', 'jest'],
plugins: ['prettier', 'promise', 'jest', 'import'],
rules: {
'no-console': 'error',
'no-param-reassign': 'warn',
Expand All @@ -29,6 +29,32 @@ module.exports = {
],
'spaced-comment': ['error', 'always', { block: { exceptions: ['*'] } }],
'jest/no-focused-tests': 'error',
'jest/no-disabled-tests': 'warn'
'jest/no-disabled-tests': 'warn',
'import/order': [
'warn',
{
alphabetize: { order: 'asc' },
groups: [
'builtin',
'external',
'internal',
['parent', 'sibling', 'index']
],
pathGroups: [
{
pattern: '{cozy-*,cozy-*/**}',
group: 'external',
position: 'after'
}
],
distinctGroup: true,
pathGroupsExcludedImportTypes: ['{cozy-*,cozy-*/**}'],
'newlines-between': 'always',
warnOnUnassignedImports: true
}
],
'import/no-extraneous-dependencies': ['warn'],
'promise/prefer-await-to-then': 'warn',
'promise/prefer-await-to-callbacks': 'warn'
}
}

0 comments on commit 84c3157

Please sign in to comment.