UNPKG

@fenixengine/eslint-config-rpgmaker

Version:

An eslint config for RPG Maker MV and RPG Maker MZ used for FeniX and LTN Games' plugins

240 lines (237 loc) 7.85 kB
import globals from 'globals'; import jsPlugin from '@eslint/js'; import importPlugin from 'eslint-plugin-import'; import nodePlugin from 'eslint-plugin-n'; import promisePlugin from 'eslint-plugin-promise'; export default { plugins: { import: importPlugin, n: nodePlugin, promise: promisePlugin, }, languageOptions: { ecmaVersion: 'latest', globals: { ...globals.browser, ...globals.node, $dataActors: 'readonly', $dataAnimations: 'readonly', $dataArmors: 'readonly', $dataClasses: 'readonly', $dataCommonEvents: 'readonly', $dataEnemies: 'readonly', $dataItems: 'readonly', $dataMap: 'readonly', $dataMapInfos: 'readonly', $dataSkills: 'readonly', $dataStates: 'readonly', $dataSystem: 'readonly', $dataTilesets: 'readonly', $dataTroops: 'readonly', $dataWeapons: 'readonly', $gameActors: 'readonly', $gameMap: 'readonly', $gameMessage: 'readonly', $gameParty: 'readonly', $gamePlayer: 'readonly', $gameScreen: 'readonly', $gameSelfSwitches: 'readonly', $gameSwitches: 'readonly', $gameSystem: 'readonly', $gameTemp: 'readonly', $gameTimer: 'readonly', $gameTroop: 'readonly', $gameVariables: 'readonly', $plugins: 'readonly', $testEvent: 'readonly', AudioManager: 'readonly', BattleManager: 'readonly', Bitmap: 'readonly', CacheEntry: 'readonly', CacheMap: 'readonly', ColorFilter: 'readonly', ColorManager: 'readonly', ConfigManager: 'readonly', DataManager: 'readonly', Decrypter: 'readonly', EffectManager: 'readonly', FontManager: 'readonly', Game_Action: 'readonly', Game_ActionResult: 'readonly', Game_Actor: 'readonly', Game_Actors: 'readonly', Game_Battler: 'readonly', Game_BattlerBase: 'readonly', Game_Character: 'readonly', Game_CharacterBase: 'readonly', Game_CommonEvent: 'readonly', Game_Enemy: 'readonly', Game_Event: 'readonly', Game_Follower: 'readonly', Game_Interpreter: 'readonly', Game_Item: 'readonly', Game_Map: 'readonly', Game_Message: 'readonly', Game_Party: 'readonly', Game_Picture: 'readonly', Game_Player: 'readonly', Game_Screen: 'readonly', Game_SelfSwitches: 'readonly', Game_System: 'readonly', Game_Temp: 'readonly', Game_Timer: 'readonly', Game_Troop: 'readonly', Game_Unit: 'readonly', Game_Variables: 'readonly', Game_Vehicle: 'readonly', Graphics: 'readonly', HTML5Audio: 'readonly', ImageCache: 'readonly', ImageManager: 'readonly', Imported: 'readonly', Input: 'readonly', JsExtensions: 'readonly', JsonEx: 'readonly', Patch: 'readonly', PIXI: 'readonly', PluginManager: 'readonly', Point: 'readonly', Rectangle: 'readonly', RequestQueue: 'readonly', ResourceHandler: 'readonly', Scene_Base: 'readonly', Scene_Battle: 'readonly', Scene_Boot: 'readonly', Scene_Debug: 'readonly', Scene_Equip: 'readonly', Scene_File: 'readonly', Scene_GameEnd: 'readonly', Scene_Gameover: 'readonly', Scene_Item: 'readonly', Scene_ItemBase: 'readonly', Scene_Load: 'readonly', Scene_Map: 'readonly', Scene_Menu: 'readonly', Scene_MenuBase: 'readonly', Scene_Name: 'readonly', Scene_Options: 'readonly', Scene_Save: 'readonly', Scene_Shop: 'readonly', Scene_Skill: 'readonly', Scene_Status: 'readonly', Scene_Title: 'readonly', SceneManager: 'readonly', ScreenSprite: 'readonly', ShaderTilemap: 'readonly', SoundManager: 'readonly', Sprite: 'readonly', Sprite_Actor: 'readonly', Sprite_Animation: 'readonly', Sprite_Balloon: 'readonly', Sprite_Base: 'readonly', Sprite_Battler: 'readonly', Sprite_Button: 'readonly', Sprite_Character: 'readonly', Sprite_Damage: 'readonly', Sprite_Destination: 'readonly', Sprite_Enemy: 'readonly', Sprite_Picture: 'readonly', Sprite_StateIcon: 'readonly', Sprite_StateOverlay: 'readonly', Sprite_Timer: 'readonly', Sprite_Weapon: 'readonly', Spriteset_Base: 'readonly', Spriteset_Battle: 'readonly', Spriteset_Map: 'readonly', Stage: 'readonly', StorageManager: 'readonly', TextManager: 'readonly', Tilemap: 'readonly', TilingSprite: 'readonly', ToneFilter: 'readonly', ToneSprite: 'readonly', TouchInput: 'readonly', Utils: 'readonly', Weather: 'readonly', WebAudio: 'readonly', Window: 'readonly', Window_ActorCommand: 'readonly', Window_Base: 'readonly', Window_BattleActor: 'readonly', Window_BattleEnemy: 'readonly', Window_BattleItem: 'readonly', Window_BattleLog: 'readonly', Window_BattleSkill: 'readonly', Window_BattleStatus: 'readonly', Window_ChoiceList: 'readonly', Window_Command: 'readonly', Window_DebugEdit: 'readonly', Window_DebugRange: 'readonly', Window_EquipCommand: 'readonly', Window_EquipItem: 'readonly', Window_EquipSlot: 'readonly', Window_EquipStatus: 'readonly', Window_EventItem: 'readonly', Window_GameEnd: 'readonly', Window_Gold: 'readonly', Window_Help: 'readonly', Window_HorzCommand: 'readonly', Window_ItemCategory: 'readonly', Window_ItemList: 'readonly', Window_MapName: 'readonly', Window_MenuActor: 'readonly', Window_MenuCommand: 'readonly', Window_MenuStatus: 'readonly', Window_Message: 'readonly', Window_NameEdit: 'readonly', Window_NameInput: 'readonly', Window_NumberInput: 'readonly', Window_Options: 'readonly', Window_PartyCommand: 'readonly', Window_SavefileList: 'readonly', Window_ScrollText: 'readonly', Window_Selectable: 'readonly', Window_ShopBuy: 'readonly', Window_ShopCommand: 'readonly', Window_ShopNumber: 'readonly', Window_ShopSell: 'readonly', Window_ShopStatus: 'readonly', Window_SkillList: 'readonly', Window_SkillStatus: 'readonly', Window_SkillType: 'readonly', Window_Status: 'readonly', Window_TitleCommand: 'readonly', WindowLayer: 'readonly', }, }, rules: { ...jsPlugin.configs.recommended.rules, ...nodePlugin.configs['flat/recommended'].rules, ...importPlugin.flatConfigs.recommended.rules, ...promisePlugin.configs.recommended.rules, 'semi': ['warn'], 'camelcase': 'off', 'no-var': 'error', 'prefer-const': ['warn', { 'destructuring': 'all' }], 'quotes': ['error', 'single'], 'strict': ['error', 'global'], 'indent': ['error', 2, { 'SwitchCase': 1 }], 'comma-dangle': ['error', 'always-multiline'], 'eqeqeq': 'error', 'no-multiple-empty-lines': ['error', { 'max': 2, 'maxEOF': 1 }], 'eol-last': 'error', 'no-trailing-spaces': 'error', 'object-curly-spacing': [ 'error', 'always', { 'objectsInObjects': true, 'arraysInObjects': true }, ], 'spaced-comment': ['error', 'always'], 'arrow-parens': ['error', 'always'], 'space-before-function-paren': ['error', 'always'], 'n/no-unsupported-features/node-builtins': ['error', { 'version': '>=16.0.0', 'ignores': ['fetch'], }], }, };