@davidsneighbour/eslint-config 4.1.0 → 4.1.3
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 +23 -22
- package/index.js +21 -5
- package/package.json +18 -13
package/README.md
CHANGED
|
@@ -32,29 +32,30 @@ or in `package.json`:
|
|
|
32
32
|
|
|
33
33
|
Write better code.
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
<!-- CONFIGURATIONS BEGIN -->
|
|
36
36
|
|
|
37
|
-
## davidsneighbour/
|
|
37
|
+
## davidsneighbour/configurations
|
|
38
38
|
|
|
39
|
-
A collection of configurations for
|
|
39
|
+
A collection of configurations for website development at DNB Org.
|
|
40
40
|
|
|
41
41
|
<!-- prettier-ignore -->
|
|
42
|
-
|
|
|
43
|
-
| --- |
|
|
44
|
-
| [
|
|
45
|
-
| [
|
|
46
|
-
| [
|
|
47
|
-
| [
|
|
48
|
-
| [
|
|
49
|
-
| [
|
|
50
|
-
| [
|
|
51
|
-
| [
|
|
52
|
-
| [
|
|
53
|
-
| [
|
|
54
|
-
| [
|
|
55
|
-
| [
|
|
56
|
-
| [
|
|
57
|
-
| [
|
|
58
|
-
| [
|
|
59
|
-
|
|
60
|
-
|
|
42
|
+
|Package | Description |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| [babel-config](https://github.com/davidsneighbour/configurations/tree/main/packages/babel-config) | [Babel](https://babeljs.io/) configuration |
|
|
45
|
+
| [bootstrap-config](https://github.com/davidsneighbour/configurations/tree/main/packages/bootstrap-config) | [Bootstrap](https://getbootstrap.com/) configuration |
|
|
46
|
+
| [browserslist-config](https://github.com/davidsneighbour/configurations/tree/main/packages/browserslist-config) | [Browserslist](https://github.com/browserslist/browserslist) configuration |
|
|
47
|
+
| [commitlint-config](https://github.com/davidsneighbour/configurations/tree/main/packages/commitlint-config) | [Commitlint](https://github.com/conventional-changelog/commitlint) configuration |
|
|
48
|
+
| [cssnano-config](https://github.com/davidsneighbour/configurations/tree/main/packages/cssnano-config) | [CSSnano](https://cssnano.co/) configuration |
|
|
49
|
+
| [cypress-config](https://github.com/davidsneighbour/configurations/tree/main/packages/cypress-config) | [Cypress](https://www.cypress.io/) configuration |
|
|
50
|
+
| [eslint-config](https://github.com/davidsneighbour/configurations/tree/main/packages/eslint-config) | [ESLint](https://github.com/eslint/eslint) configuration |
|
|
51
|
+
| [htmlvalidate-config](https://github.com/davidsneighbour/configurations/tree/main/packages/htmlvalidate-config) | [HTMLValidate](https://html-validate.org/) configuration |
|
|
52
|
+
| [postcss-config](https://github.com/davidsneighbour/configurations/tree/main/packages/postcss-config) | [PostCSS](https://postcss.org/) configuration |
|
|
53
|
+
| [prettier-config](https://github.com/davidsneighbour/configurations/tree/main/packages/prettier-config) | [Prettier](https://prettier.io/) configuration |
|
|
54
|
+
| [remark-config](https://github.com/davidsneighbour/configurations/tree/main/packages/remark-config) | [ReMark](https://github.com/remarkjs/remark-lint) configuration |
|
|
55
|
+
| [standard-version-config](https://github.com/davidsneighbour/configurations/tree/main/packages/standard-version-config) | [Standard Version](https://github.com/conventional-changelog/standard-version) configuration |
|
|
56
|
+
| [stylelint-config](https://github.com/davidsneighbour/configurations/tree/main/packages/stylelint-config) | [StyleLint](https://github.com/stylelint/stylelint) configuration |
|
|
57
|
+
| [textlint-config](https://github.com/davidsneighbour/configurations/tree/main/packages/textlint-config) | [TextLint](https://github.com/textlint/textlint) configuration |
|
|
58
|
+
| [webpack-config](https://github.com/davidsneighbour/configurations/tree/main/packages/webpack-config) | [Webpack](https://webpack.js.org/) configuration |
|
|
59
|
+
| [tools](https://github.com/davidsneighbour/configurations/tree/main/packages/tools) | Tools |
|
|
60
|
+
|
|
61
|
+
<!-- CONFIGURATIONS END -->
|
package/index.js
CHANGED
|
@@ -1,17 +1,33 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
|
|
3
|
+
const path = './tsconfig.json';
|
|
4
|
+
let projectValue = '';
|
|
5
|
+
if (fs.existsSync(path)) {
|
|
6
|
+
projectValue = path;
|
|
7
|
+
}
|
|
8
|
+
|
|
1
9
|
module.exports = {
|
|
2
10
|
parser: '@typescript-eslint/parser',
|
|
3
11
|
parserOptions: {
|
|
4
|
-
|
|
12
|
+
"ecmaVersion": "latest",
|
|
13
|
+
"sourceType": "module",
|
|
14
|
+
project: projectValue,
|
|
5
15
|
},
|
|
6
16
|
plugins: [
|
|
7
|
-
'anti-trojan-source',
|
|
8
17
|
'@typescript-eslint',
|
|
9
|
-
'
|
|
10
|
-
'sonarjs',
|
|
18
|
+
'anti-trojan-source',
|
|
11
19
|
'html',
|
|
20
|
+
'no-loops',
|
|
12
21
|
'package-json',
|
|
22
|
+
'sonarjs',
|
|
23
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn
|
|
24
|
+
"unicorn",
|
|
25
|
+
],
|
|
26
|
+
ignorePatterns: [
|
|
27
|
+
'**/node_modules/*',
|
|
28
|
+
'**/vendor/*',
|
|
29
|
+
'**/.git/*'
|
|
13
30
|
],
|
|
14
|
-
ignorePatterns: ['**/node_modules/*', '**/vendor/*', '**/.git/*'],
|
|
15
31
|
settings: {
|
|
16
32
|
'html/html-extensions': ['.html', '.htm'],
|
|
17
33
|
'html/xml-extensions': ['.xml'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@davidsneighbour/eslint-config",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.3",
|
|
4
4
|
"description": "ESlint configuration for use in davidsneighbour projects.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": "davidsneighbour/configurations",
|
|
@@ -13,18 +13,23 @@
|
|
|
13
13
|
"bugs": "https://github.com/davidsneighbour/configurations/issues",
|
|
14
14
|
"homepage": "https://github.com/davidsneighbour/eslint-config#readme",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@
|
|
17
|
-
"@typescript-eslint/
|
|
18
|
-
"eslint": "
|
|
19
|
-
"eslint
|
|
20
|
-
"eslint-
|
|
21
|
-
"eslint-plugin-
|
|
22
|
-
"eslint-plugin-
|
|
23
|
-
"eslint-plugin-
|
|
24
|
-
"eslint-plugin-
|
|
25
|
-
"eslint-plugin-
|
|
26
|
-
"eslint-plugin-
|
|
16
|
+
"@davidsneighbour/prettier-config": "^4.0.8",
|
|
17
|
+
"@typescript-eslint/eslint-plugin": "^5.31.0",
|
|
18
|
+
"@typescript-eslint/parser": "^5.31.0",
|
|
19
|
+
"eslint": "^8.21.0",
|
|
20
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
21
|
+
"eslint-plugin-anti-trojan-source": "^1.1.0",
|
|
22
|
+
"eslint-plugin-compat": "^4.0.2",
|
|
23
|
+
"eslint-plugin-cypress": "^2.12.1",
|
|
24
|
+
"eslint-plugin-html": "^7.1.0",
|
|
25
|
+
"eslint-plugin-import": "^2.26.0",
|
|
26
|
+
"eslint-plugin-markdown": "^3.0.0",
|
|
27
|
+
"eslint-plugin-no-loops": "^0.3.0",
|
|
27
28
|
"eslint-plugin-package-json": "^0.1.4",
|
|
28
|
-
"eslint-plugin-sonarjs": "
|
|
29
|
+
"eslint-plugin-sonarjs": "^0.14.0",
|
|
30
|
+
"eslint-plugin-unicorn": "^43.0.2"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"release": "../../release"
|
|
29
34
|
}
|
|
30
35
|
}
|