@shlinkio/eslint-config-js-coding-standard 2.0.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,4 +5,4 @@
5
5
  [![GitHub license](https://img.shields.io/github/license/shlinkio/js-coding-standard.svg?style=flat-square)](https://github.com/shlinkio/js-coding-standard/blob/master/LICENSE)
6
6
  [![Paypal Donate](https://img.shields.io/badge/Donate-paypal-blue.svg?style=flat-square&logo=paypal&colorA=cccccc)](https://acel.me/donate)
7
7
 
8
- Coding standard used by shlink JavaScript projects.
8
+ Coding standard used by Shlink JavaScript projects.
package/dist/index.js CHANGED
@@ -4,15 +4,34 @@ module.exports = {
4
4
  'airbnb-typescript',
5
5
  'plugin:@typescript-eslint/recommended'
6
6
  ],
7
+ plugins: ['simple-import-sort'],
7
8
  rules: {
8
- 'object-curly-newline': 'off',
9
- 'implicit-arrow-linebreak': 'off',
10
- 'no-restricted-globals': 'off',
11
- 'default-case': 'off',
9
+ // Customize rules or add on top of presets
12
10
  'max-len': [
13
11
  'error',
14
12
  { 'code': 120, 'ignoreComments': true, 'ignoreStrings': true, 'ignoreTemplateLiterals': true },
15
13
  ],
14
+ '@typescript-eslint/consistent-type-imports': 'error',
15
+ 'simple-import-sort/imports': ['error', {
16
+ 'groups': [
17
+ ['^', '^\\.', '\\.s?css$']
18
+ ]
19
+ }],
20
+ 'no-restricted-exports': ['error', {
21
+ 'restrictDefaultExports': {
22
+ 'direct': true,
23
+ 'named': true,
24
+ 'defaultFrom': true,
25
+ 'namedFrom': true,
26
+ 'namespaceFrom': true
27
+ }
28
+ }],
29
+
30
+ // Disabled rules from presets
31
+ 'object-curly-newline': 'off',
32
+ 'implicit-arrow-linebreak': 'off',
33
+ 'no-restricted-globals': 'off',
34
+ 'default-case': 'off',
16
35
  'import/no-cycle': 'off',
17
36
  'import/prefer-default-export': 'off',
18
37
  'import/no-extraneous-dependencies': 'off',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shlinkio/eslint-config-js-coding-standard",
3
- "version": "2.0.2",
3
+ "version": "2.1.0",
4
4
  "description": "Coding standard used by shlink JavaScript projects",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -23,17 +23,18 @@
23
23
  "build": "mkdir -p dist && rm -rf dist/* && cp index.js dist"
24
24
  },
25
25
  "dependencies": {
26
- "@typescript-eslint/eslint-plugin": "^5.16.0",
27
- "@typescript-eslint/parser": "^5.16.0",
26
+ "@typescript-eslint/eslint-plugin": "^5.52.0",
27
+ "@typescript-eslint/parser": "^5.52.0",
28
28
  "eslint-config-airbnb": "^19.0.4",
29
- "eslint-config-airbnb-typescript": "^16.1.4"
29
+ "eslint-config-airbnb-typescript": "^16.2.0",
30
+ "eslint-plugin-simple-import-sort": "^10.0.0"
30
31
  },
31
32
  "peerDependencies": {
32
- "eslint": "^8.12.0"
33
+ "eslint": "^8.34.0"
33
34
  },
34
35
  "devDependencies": {
35
- "eslint": "^8.12.0",
36
- "typescript": "^4.6.3"
36
+ "eslint": "^8.34.0",
37
+ "typescript": "^4.9.5"
37
38
  },
38
39
  "files": [
39
40
  "dist"