Skip to content

Commit 90a5f16

Browse files
committed
chore: remove ESLint configuration and update project settings for Bun compatibility
1 parent 5ab2b62 commit 90a5f16

19 files changed

+109
-352
lines changed

.eslintrc.js renamed to .eslintrc.cjs

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,35 @@
11
module.exports = {
2+
root: true,
3+
env: {
4+
node: true,
5+
'jest/globals': true,
6+
},
7+
8+
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
9+
plugins: ['@typescript-eslint/eslint-plugin', 'import', 'jest'],
10+
211
parser: '@typescript-eslint/parser',
312
parserOptions: {
413
project: 'tsconfig.json',
514
tsconfigRootDir: __dirname,
615
sourceType: 'module',
716
},
8-
plugins: ['@typescript-eslint/eslint-plugin'],
9-
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
10-
root: true,
11-
env: {
12-
node: true,
13-
jest: true,
14-
},
15-
ignorePatterns: ['.eslintrc.js'],
17+
ignorePatterns: ['.eslintrc.cjs'],
18+
1619
rules: {
1720
'no-console': 0,
18-
'comma-dangle': [2, 'always-multiline'],
21+
'import/named': 'off',
22+
'comma-dangle': ['error', 'always-multiline'],
1923
'quotes': [2, 'single', { 'avoidEscape': true }],
24+
'no-extra-parens': 2, // https: //eslint.org/docs/rules/no-extra-parens
25+
'curly': 2, // https: //eslint.org/docs/rules/curly
26+
'eqeqeq': 2, // https: //eslint.org/docs/rules/eqeqeq
27+
'indent': ['error', 2],
28+
'camelcase': 'off',
29+
'no-empty': 'off',
30+
'padded-blocks': 'off',
31+
'import/first': 'off',
32+
2033
'@typescript-eslint/interface-name-prefix': 'off',
2134
'@typescript-eslint/explicit-function-return-type': 'off',
2235
'@typescript-eslint/explicit-module-boundary-types': 'off',

.npmrc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
# Force l'utilisation de Bun comme gestionnaire de packages
2-
engine-strict=true
1+
engine-strict=true
2+
shamefully-hoist=true
3+
strict-peer-dependencies=false
4+
package-manager=bun@latest

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"singleQuote": true,
55
"trailingComma": "all",
66
"arrowParens": "always",
7-
"printWidth": 120,
7+
"printWidth": 180,
88
"bracketSpacing": true
99
}

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2024, The Software Compagny
3+
Copyright (c) 2024, Tacxou
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without
@@ -26,4 +26,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2626
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2727
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2828
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

THIRD_PARTY_NOTICES.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Third-Party Notices
2+
3+
This project includes source code derived from the JSON Forms project, which is licensed under the MIT License by EclipseSource Munich (2017-2019). The MIT License text is reproduced below in accordance with its terms.
4+
5+
## JSON Forms (MIT License)
6+
7+
```
8+
The MIT License
9+
10+
Copyright (c) 2017-2019 EclipseSource Munich
11+
https://github.com/eclipsesource/jsonforms
12+
13+
Permission is hereby granted, free of charge, to any person obtaining a copy
14+
of this software and associated documentation files (the "Software"), to deal
15+
in the Software without restriction, including without limitation the rights
16+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17+
copies of the Software, and to permit persons to whom the Software is
18+
furnished to do so, subject to the following conditions:
19+
20+
The above copyright notice and this permission notice shall be included in
21+
all copies or substantial portions of the Software.
22+
23+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29+
THE SOFTWARE.
30+
```

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,10 @@
2929
}
3030
},
3131
"scripts": {
32-
"preinstall": "bunx only-allow bun",
3332
"prebuild": "rimraf dist",
3433
"build": "bunx vite build --config vite.config.ts",
35-
"postbuild": "cpr README.md dist/README.md && cpr LICENSE dist/LICENSE && cpr package.json dist/package.json",
3634
"start:dev": "cd playground && bunx vite --host",
37-
"preview": "bunx vite preview",
35+
"postbuild": "cpr README.md dist/README.md && cpr LICENSE dist/LICENSE && cpr package.json dist/package.json",
3836
"test": "bun test",
3937
"test:watch": "bun test --watch"
4038
},
@@ -90,5 +88,6 @@
9088
"engines": {
9189
"node": ">=22.0.0",
9290
"bun": ">=1.0.0"
93-
}
91+
},
92+
"packageManager": "[email protected]"
9493
}

playground/examples/items/1884.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
/*
2-
The MIT License
3-
4-
Copyright (c) 2017-2019 EclipseSource Munich
5-
https://github.com/eclipsesource/jsonforms
6-
7-
Permission is hereby granted, free of charge, to any person obtaining a copy
8-
of this software and associated documentation files (the "Software"), to deal
9-
in the Software without restriction, including without limitation the rights
10-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11-
copies of the Software, and to permit persons to whom the Software is
12-
furnished to do so, subject to the following conditions:
13-
14-
The above copyright notice and this permission notice shall be included in
15-
all copies or substantial portions of the Software.
16-
17-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23-
THE SOFTWARE.
24-
*/
251
import { registerExamples } from '../register'
262

273
export const schema = {

playground/examples/items/1948.ts

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
1-
/*
2-
The MIT License
3-
4-
Copyright (c) 2022 EclipseSource Munich
5-
https://github.com/eclipsesource/jsonforms
6-
7-
Permission is hereby granted, free of charge, to any person obtaining a copy
8-
of this software and associated documentation files (the 'Software'), to deal
9-
in the Software without restriction, including without limitation the rights
10-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11-
copies of the Software, and to permit persons to whom the Software is
12-
furnished to do so, subject to the following conditions:
13-
14-
The above copyright notice and this permission notice shall be included in
15-
all copies or substantial portions of the Software.
16-
17-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23-
THE SOFTWARE.
24-
*/
25-
import { registerExamples } from '../register';
26-
import { UISchemaElement } from '@jsonforms/core';
1+
import { registerExamples } from '../register'
2+
import { UISchemaElement } from '@jsonforms/core'
273

284
export const schema = {
295
type: 'object',
@@ -55,9 +31,9 @@ export const schema = {
5531
},
5632
},
5733
},
58-
};
34+
}
5935

60-
export const uischema: UISchemaElement = undefined;
36+
export const uischema: UISchemaElement = undefined
6137

6238
export const data = {
6339
import: [
@@ -67,7 +43,7 @@ export const data = {
6743
prefix: 'Prefix',
6844
},
6945
],
70-
};
46+
}
7147

7248
registerExamples([
7349
{
@@ -84,4 +60,4 @@ registerExamples([
8460
schema: undefined,
8561
uischema,
8662
},
87-
]);
63+
])
Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,9 @@
1-
/*
2-
The MIT License
1+
import { ErrorObject } from 'ajv'
2+
import { StateProps } from '../example'
3+
import { registerExamples } from '../register'
4+
import { schema, uischema, data } from './person'
35

4-
Copyright (c) 2022 STMicroelectronics and others.
5-
https://github.com/eclipsesource/jsonforms
6-
7-
Permission is hereby granted, free of charge, to any person obtaining a copy
8-
of this software and associated documentation files (the "Software"), to deal
9-
in the Software without restriction, including without limitation the rights
10-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11-
copies of the Software, and to permit persons to whom the Software is
12-
furnished to do so, subject to the following conditions:
13-
14-
The above copyright notice and this permission notice shall be included in
15-
all copies or substantial portions of the Software.
16-
17-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23-
THE SOFTWARE.
24-
*/
25-
import { ErrorObject } from 'ajv';
26-
import { StateProps } from '../example';
27-
import { registerExamples } from '../register';
28-
import { schema, uischema, data } from './person';
29-
30-
export const additionalErrors: ErrorObject[] = [];
6+
export const additionalErrors: ErrorObject[] = []
317

328
export const actions = [
339
{
@@ -46,7 +22,7 @@ export const actions = [
4622
};
4723
},
4824
},
49-
];
25+
]
5026

5127
registerExamples([
5228
{
@@ -57,4 +33,4 @@ registerExamples([
5733
uischema,
5834
actions,
5935
},
60-
]);
36+
])

playground/examples/items/additional-properties.ts

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,4 @@
1-
/*
2-
The MIT License
3-
4-
Copyright (c) 2017-2019 EclipseSource Munich
5-
https://github.com/eclipsesource/jsonforms
6-
7-
Permission is hereby granted, free of charge, to any person obtaining a copy
8-
of this software and associated documentation files (the "Software"), to deal
9-
in the Software without restriction, including without limitation the rights
10-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11-
copies of the Software, and to permit persons to whom the Software is
12-
furnished to do so, subject to the following conditions:
13-
14-
The above copyright notice and this permission notice shall be included in
15-
all copies or substantial portions of the Software.
16-
17-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23-
THE SOFTWARE.
24-
*/
25-
import { registerExamples } from '../register';
1+
import { registerExamples } from '../register'
262

273
export const schema = {
284
$schema: 'http://json-schema.org/draft-07/schema#',
@@ -97,12 +73,12 @@ export const schema = {
9773
title: 'Additional Properties',
9874
},
9975
maxProperties: 15,
100-
};
76+
}
10177

10278
export const uischema = {
10379
type: 'Control',
10480
scope: '#/',
105-
};
81+
}
10682

10783
const data = {
10884
propertiesString: 'data',
@@ -118,7 +94,7 @@ const data = {
11894
integerArray: [33],
11995
objectArray: [{ prop1: 'prop1 val' }, {}],
12096
booleanArray: [false, true],
121-
};
97+
}
12298

12399
registerExamples([
124100
{
@@ -128,4 +104,4 @@ registerExamples([
128104
schema,
129105
uischema,
130106
},
131-
]);
107+
])

0 commit comments

Comments
 (0)