@isentinel/eslint-config 3.2.2 → 3.3.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/dist/cli.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +13 -7
- package/package.json +2 -2
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -15870,9 +15870,11 @@ interface OptionsProjectType {
|
|
|
15870
15870
|
* Type of the project. `package` will enable more strict rules for
|
|
15871
15871
|
* packages.
|
|
15872
15872
|
*
|
|
15873
|
+
* `app` and `game` are treated the same.
|
|
15874
|
+
*
|
|
15873
15875
|
* @default "game"
|
|
15874
15876
|
*/
|
|
15875
|
-
type?: "game" | "package";
|
|
15877
|
+
type?: "app" | "game" | "package";
|
|
15876
15878
|
}
|
|
15877
15879
|
interface OptionsRoblox {
|
|
15878
15880
|
/** Enable or disable Roblox-specific rules. */
|
package/dist/index.js
CHANGED
|
@@ -408,6 +408,7 @@ async function disables() {
|
|
|
408
408
|
"import/no-duplicates": "off",
|
|
409
409
|
"max-lines": "off",
|
|
410
410
|
"no-restricted-syntax": "off",
|
|
411
|
+
"shopify/prefer-class-properties": "off",
|
|
411
412
|
"sonar/no-duplicate-string": "off",
|
|
412
413
|
"unused-imports/no-unused-vars": "off"
|
|
413
414
|
}
|
|
@@ -4791,6 +4792,11 @@ async function isentinel(options = {}, ...userConfigs) {
|
|
|
4791
4792
|
isInEditor = isInEditorEnvironment();
|
|
4792
4793
|
if (isInEditor) console.log("[@isentinel/eslint-config] Detected running in editor, some rules are disabled.");
|
|
4793
4794
|
}
|
|
4795
|
+
const projectType = (() => {
|
|
4796
|
+
if (options.type === "app") return "game";
|
|
4797
|
+
if (options.type !== void 0) return options.type;
|
|
4798
|
+
return enableRoblox ? "game" : "package";
|
|
4799
|
+
})();
|
|
4794
4800
|
const stylisticOptions = (() => {
|
|
4795
4801
|
if (options.stylistic === false) return false;
|
|
4796
4802
|
if (typeof options.stylistic === "object") return options.stylistic;
|
|
@@ -4823,10 +4829,10 @@ async function isentinel(options = {}, ...userConfigs) {
|
|
|
4823
4829
|
stylistic: stylisticOptions
|
|
4824
4830
|
}), ignores(options.ignores), imports({
|
|
4825
4831
|
stylistic: stylisticOptions,
|
|
4826
|
-
type:
|
|
4832
|
+
type: projectType
|
|
4827
4833
|
}), packageJson({
|
|
4828
4834
|
roblox: enableRoblox,
|
|
4829
|
-
type:
|
|
4835
|
+
type: projectType
|
|
4830
4836
|
}), javascript({
|
|
4831
4837
|
...getOverrides(options, "javascript"),
|
|
4832
4838
|
isInEditor,
|
|
@@ -4841,9 +4847,9 @@ async function isentinel(options = {}, ...userConfigs) {
|
|
|
4841
4847
|
if (options.flawless === true) configs.push(flawless({ ...getOverrides(options, "flawless") }));
|
|
4842
4848
|
if (enableJsdoc !== false) configs.push(jsdoc({
|
|
4843
4849
|
stylistic: stylisticOptions,
|
|
4844
|
-
type:
|
|
4850
|
+
type: projectType
|
|
4845
4851
|
}));
|
|
4846
|
-
if (
|
|
4852
|
+
if (projectType === "package" && !enableRoblox) configs.push(node());
|
|
4847
4853
|
if (enableJsx) configs.push(jsx());
|
|
4848
4854
|
if (enableEslintPlugin !== false) configs.push(eslintPlugin({ ...getOverrides(options, "eslintPlugin") }));
|
|
4849
4855
|
if (enableRoblox) {
|
|
@@ -4857,7 +4863,7 @@ async function isentinel(options = {}, ...userConfigs) {
|
|
|
4857
4863
|
}
|
|
4858
4864
|
if (stylisticOptions !== false) configs.push(stylistic(stylisticOptions, prettierSettings), perfectionist({
|
|
4859
4865
|
...resolveSubOptions(options, "perfectionist"),
|
|
4860
|
-
type:
|
|
4866
|
+
type: projectType
|
|
4861
4867
|
}));
|
|
4862
4868
|
if (options.test !== void 0 && options.test !== false) {
|
|
4863
4869
|
const testOptions = typeof options.test === "object" ? options.test : {};
|
|
@@ -4865,7 +4871,7 @@ async function isentinel(options = {}, ...userConfigs) {
|
|
|
4865
4871
|
...getOverrides(options, "test"),
|
|
4866
4872
|
isInEditor,
|
|
4867
4873
|
roblox: enableRoblox,
|
|
4868
|
-
type:
|
|
4874
|
+
type: projectType,
|
|
4869
4875
|
...testOptions
|
|
4870
4876
|
}));
|
|
4871
4877
|
}
|
|
@@ -4896,7 +4902,7 @@ async function isentinel(options = {}, ...userConfigs) {
|
|
|
4896
4902
|
if (options.markdown !== false) configs.push(markdown({
|
|
4897
4903
|
...getOverrides(options, "markdown"),
|
|
4898
4904
|
componentExts: componentExtensions,
|
|
4899
|
-
type:
|
|
4905
|
+
type: projectType
|
|
4900
4906
|
}));
|
|
4901
4907
|
if (enableSpellCheck !== false) configs.push(spelling({
|
|
4902
4908
|
...resolveSubOptions(options, "spellCheck"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isentinel/eslint-config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "iSentinel's ESLint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint-config",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"tsdown": "0.14.2",
|
|
120
120
|
"type-fest": "4.41.0",
|
|
121
121
|
"typescript": "5.9.2",
|
|
122
|
-
"@isentinel/eslint-config": "3.
|
|
122
|
+
"@isentinel/eslint-config": "3.3.0"
|
|
123
123
|
},
|
|
124
124
|
"peerDependencies": {
|
|
125
125
|
"@eslint-react/eslint-plugin": "^1.45.0",
|