Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
1742bca
feat: up deps, format rules
kholstinin Apr 24, 2023
9533d7e
feat: custom rules
kholstinin Apr 26, 2023
a67e27d
feat: refactor rules
kholstinin Apr 27, 2023
c375ad2
jsdoc
kholstinin Apr 27, 2023
fe58aad
feat: eslint plugin publish
kholstinin Apr 27, 2023
c455e4e
fix: jsdoc settings, tests rules
kholstinin Apr 27, 2023
f56bd71
fix: deprecation plugin
kholstinin Apr 27, 2023
76f6231
fix: jsdoc settings
kholstinin Apr 28, 2023
8fe87da
feat: added typeparam
kholstinin Apr 28, 2023
d47339e
fix: newline-after-description multiline
kholstinin Apr 29, 2023
25380a0
feat: up eslint-plugin
kholstinin Apr 29, 2023
7ac387e
feat: move eslint-plugin outside
kholstinin May 2, 2023
35e4cbd
feat: remove slow rules
kholstinin May 16, 2023
1aeb4d7
chore: copyright
kholstinin May 22, 2023
ec5446e
feat: up eslint-rules
kholstinin May 22, 2023
0fd0f0a
feat: eslint header plugin
kholstinin May 22, 2023
499d5cc
feat: disable some rules
kholstinin May 23, 2023
06384b5
feat: update eslint-plugin-jsdoc
kholstinin May 23, 2023
3f19375
feat: update eslint-plugin
kholstinin May 23, 2023
873cad6
fix: jsdoc inheritDoc
kholstinin May 24, 2023
ad183ad
feat: up eslint-plugin
kholstinin May 26, 2023
c0fddb8
feat: up eslint-plugin
kholstinin May 30, 2023
0150cf1
fix: require-jsdoc rule
kholstinin May 31, 2023
6f1257d
feat: yaspeller
kholstinin May 31, 2023
9befb47
fix: require-jsdoc
kholstinin May 31, 2023
3e89124
feat: off require-param-description
kholstinin Jun 1, 2023
d1c42fb
feat: disable jsdoc rule
kholstinin Jun 8, 2023
aafd074
fix: padding line after multiline
kholstinin Jun 28, 2023
9fdbbad
feat: add storybook rules
shining-mind Jul 14, 2023
d44ec88
Merge pull request #31 from V4Fire/storybook-rules
kholstinin Jul 27, 2023
00a3092
feat: up eslint-plugin, typescript optional
kholstinin Sep 18, 2023
be954e7
feat: configurable header in config
kholstinin Sep 18, 2023
031ed6d
feat: up dependencies
kholstinin Sep 18, 2023
c4b2853
feat: up typescript-eslint
kholstinin Sep 18, 2023
ce42ee3
feat: move on flat config
kholstinin Sep 18, 2023
5ffefaa
feat: flat config refactored, removed slow rules
kholstinin Sep 19, 2023
e3c44f5
feat: up eslint-plugin
kholstinin Sep 19, 2023
f7f700f
Merge branch 'master' into rework_rules
kholstinin Jul 26, 2024
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
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

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

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Icon
/tmp
/app-cache
/app-std-cache
.eslintcache
/src/entries/tmp
/db

Expand Down
12 changes: 0 additions & 12 deletions .stlintrc

This file was deleted.

12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ Changelog

_Note: Gaps between patch versions are faulty, broken or test releases._

## v2.?.? (2023-??-??)

#### :house: Internal

* Added custom rules from `@v4fire/eslint-plugin`
* Refactored many rules

### :boom: Breaking Change

* Now .eslintrc.js config returns function
* `Typescript` now optional `peerDependency`

## v2.8.0 (2024-05-30)

### :rocket: New Feature
Expand Down
72 changes: 46 additions & 26 deletions eslint-configs/global-rules.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*!
* V4Fire Linters
* https://github.com/V4Fire/Linters
*
* Released under the MIT license
* https://github.com/V4Fire/Linters/blob/master/LICENSE
*/

module.exports = {
// ES spec ESLint rules
strict: ['error', 'global'],
Expand Down Expand Up @@ -133,6 +141,8 @@ module.exports = {
'no-regex-spaces': 'warn',
'no-irregular-whitespace': ['error', {skipStrings: true, skipTemplates: true}],

'optimize-regex/optimize-regex': 'warn',

// Dead code

'no-lone-blocks': 'off',
Expand Down Expand Up @@ -236,6 +246,9 @@ module.exports = {
{blankLine: 'always', prev: 'function', next: '*'},
{blankLine: 'always', prev: 'iife', next: '*'},
{blankLine: 'always', prev: 'multiline-block-like', next: '*'},
{blankLine: 'always', prev: 'multiline-const', next: '*'},
{blankLine: 'always', prev: 'multiline-let', next: '*'},
{blankLine: 'always', prev: 'multiline-var', next: '*'},
{blankLine: 'always', prev: 'multiline-expression', next: '*'},
{blankLine: 'always', prev: 'directive', next: '*'},
{blankLine: 'always', prev: 'import', next: 'export'},
Expand All @@ -250,6 +263,18 @@ module.exports = {
'semi-spacing': 'error',
'semi-style': 'error',

indent: [
'error', 'tab', {
SwitchCase: 1,
ignoredNodes: [
// Ignore property expression with decorator
'FunctionExpression > .params[decorators.length > 0]',
'FunctionExpression > .params > :matches(Decorator, :not(:first-child))',
'ClassBody.body > PropertyDefinition[decorators.length > 0] > .key'
],
MemberExpression: 1
}
],
'no-multi-spaces': 'error',
'no-trailing-spaces': 'error',

Expand All @@ -260,15 +285,21 @@ module.exports = {
'space-before-blocks': 'error',
'no-whitespace-before-property': 'error',

'keyword-spacing': 'off',
'keyword-spacing': [
'error',
{
before: true,
after: true
}
],

'rest-spread-spacing': 'error',
'yield-star-spacing': ['error', 'after'],
'generator-star-spacing': [
'error', {
before: false,
after: true,
method: {before: false, after: false}
method: {before: true, after: false}
}
],

Expand All @@ -287,7 +318,7 @@ module.exports = {
'object-curly-newline': ['error', {consistent: true}],
'object-property-newline': ['error', {allowAllPropertiesOnSameLine: true}],

'enchanted-curly/object-curly-spacing': [
'@v4fire/enchanted-curly': [
'error', 'never', {
multiline: true,
import: true,
Expand Down Expand Up @@ -376,6 +407,8 @@ module.exports = {

'lines-between-class-members': 'error',

'@v4fire/member-order': 'error',

// Comments

'no-warning-comments': 'off',
Expand Down Expand Up @@ -457,7 +490,8 @@ module.exports = {
'no-unused-vars': [
'error', {
vars: 'all',
args: 'after-used'
args: 'after-used',
argsIgnorePattern: '^_'
}
],

Expand Down Expand Up @@ -518,7 +552,7 @@ module.exports = {
],

'max-len': [
'error', {
'error', {
code: 120,
tabWidth: 2,
ignoreUrls: true,
Expand All @@ -531,34 +565,33 @@ module.exports = {
// [Import]

'import/no-unresolved': 'off',
// 'import/no-cycle': 'warn',

'import/no-absolute-path': 'error',
'import/no-relative-parent-imports': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-useless-path-segments': 'error',
'import/no-self-import': 'error',
'import/no-internal-modules': 'off',
'import/no-nodejs-modules': 'warn',

'import/no-commonjs': 'off',
'import/no-dynamic-require': 'off',
'import/no-webpack-loader-syntax': 'off',
'import/no-amd': 'error',

'import/named': 'error',
'import/default': 'error',
'import/namespace': 'error',
'import/no-unassigned-import': 'off',

'import/export': 'error',
'import/no-mutable-exports': 'warn',
'import/no-named-export': 'off',
'import/group-exports': 'off',

'import/no-named-as-default': 'error',
'import/no-named-as-default-member': 'error',
'import/no-named-default': 'error',

// Slow rules
'import/default': 'error',
'import/named': 'error',
'import/namespace': 'error',
'import/no-named-as-default-member': 'error',

'import/no-anonymous-default-export': [
'error', {
Expand All @@ -572,8 +605,6 @@ module.exports = {
}
],

'import/no-deprecated': 'warn',
'import/no-unused-modules': 'warn',
'import/unambiguous': 'off',

'import/first': 'error',
Expand All @@ -584,16 +615,5 @@ module.exports = {

'import/no-duplicates': 'off',
'import/no-namespace': 'off',
'import/max-dependencies': 'off',

'import/extensions': [
'error', {
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
svg: 'always',
json: 'always'
}
]
'import/max-dependencies': 'off'
};
Loading